| 1 |
#!/usr/bin/python |
| 2 |
|
| 3 |
from utils import * |
| 4 |
|
| 5 |
class DelayedTests(IloTestCase): |
| 6 |
def test_delayed_calls(self, ilo): |
| 7 |
uid = {'ON': 'Yes', 'OFF': 'No'}[ilo.get_uid_status()] |
| 8 |
non_delayed = [ |
| 9 |
ilo.get_all_users(), |
| 10 |
ilo.get_global_settings(), |
| 11 |
] |
| 12 |
try: |
| 13 |
ilo.delayed = True |
| 14 |
ilo.get_all_users() |
| 15 |
ilo.uid_control(uid=uid) |
| 16 |
ilo.get_global_settings() |
| 17 |
delayed = ilo.call_delayed() |
| 18 |
finally: |
| 19 |
ilo.delayed = False |
| 20 |
self.assertEquals(non_delayed, delayed) |
| 21 |
|
| 22 |
if __name__ == '__main__': |
| 23 |
unittest.main() |