File: test_uid.py

package info (click to toggle)
python-hpilo 4.4.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,784 kB
  • sloc: python: 3,418; ruby: 467; makefile: 122; sh: 31
file content (17 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python

from utils import *

class UidTests(IloTestCase):
    def test_uid(self, ilo):
        old = ilo.get_uid_status()
        new = {'ON': 'No', 'OFF': 'Yes'}[old]
        new2 = {'ON': 'OFF', 'OFF': 'ON'}[old]
        try:
            ilo.uid_control(uid=new)
            self.assertEqual(new2, ilo.get_uid_status())
        finally:
            ilo.uid_control(uid=old)

if __name__ == '__main__':
    unittest.main()