예제 #1
0
 def test_sec_file_empty_string(self):
     cmd = NaviCommand('a', 'a', 1, '', timeout=20)
     assert_that(' '.join(map(str, cmd.get_credentials())),
                 equal_to('-user a -password a -scope 1 -t 20'))
예제 #2
0
 def test_security_file_precedence(self):
     cmd = NaviCommand(sec_file=r'/a/b/c.key',
                       username='******',
                       password='')
     assert_that(' '.join(cmd.get_credentials()),
                 equal_to('-secfilepath /a/b/c.key'))
예제 #3
0
 def test_username_password_timeout(self):
     cmd = NaviCommand('a', 'a', 1, timeout=20)
     assert_that(' '.join(map(str, cmd.get_credentials())),
                 equal_to('-user a -password a -scope 1 -t 20'))
예제 #4
0
 def test_security_file(self):
     cmd = NaviCommand(sec_file=r'/a/b/c.key')
     assert_that(' '.join(cmd.get_credentials()),
                 equal_to('-secfilepath /a/b/c.key'))
예제 #5
0
 def test_default_security_file(self):
     cmd = NaviCommand()
     assert_that(cmd.get_credentials(), equal_to([]))
예제 #6
0
 def test_username_password_timeout(self):
     cmd = NaviCommand('a', 'a', 1, timeout=20)
     assert_that(' '.join(map(str, cmd.get_credentials())),
                 equal_to('-user a -password a -scope 1 -t 20'))
예제 #7
0
 def test_security_file(self):
     cmd = NaviCommand(sec_file=r'/a/b/c.key')
     assert_that(' '.join(cmd.get_credentials()),
                 equal_to('-secfilepath /a/b/c.key'))
예제 #8
0
 def test_default_security_file(self):
     cmd = NaviCommand()
     assert_that(cmd.get_credentials(), equal_to([]))