tests/test_uid.py
raw| 1 | #!/usr/bin/python |
| 2 | |
| 3 | from utils import * |
| 4 | |
| 5 | class UidTests(IloTestCase): |
| 6 | def test_uid(self, ilo): |
| 7 | old = ilo.get_uid_status() |
| 8 | new = {'ON': 'No', 'OFF': 'Yes'}[old] |
| 9 | new2 = {'ON': 'OFF', 'OFF': 'ON'}[old] |
| 10 | try: |
| 11 | ilo.uid_control(uid=new) |
| 12 | self.assertEqual(new2, ilo.get_uid_status()) |
| 13 | finally: |
| 14 | ilo.uid_control(uid=old) |
| 15 | |
| 16 | if __name__ == '__main__': |
| 17 | unittest.main() |