File: test_global_settings.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 (23 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python

from utils import *

class GlobalSettingsTests(IloTestCase):
    def test_mod_global_settings(self, ilo):
        old = ilo.get_global_settings()
        try:
            ilo.mod_global_settings(
                f8_login_required=True,
                min_password=3
            )
            new = ilo.get_global_settings()
            self.assertEqual(new['f8_login_required'], True)
            self.assertEqual(new['min_password'], 3)
        finally:
            ilo.mod_global_settings(
                f8_login_required=old['f8_login_required'],
                min_password=old['min_password']
            )

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