Esempio n. 1
0
 def test_username_authproto_authkey_privproto_privkey(self):
     d = parse_authfile_line('username:md5:authkey:aes128:privkey')
     assert d['community'] == None
     assert d['username'] == 'username'
     assert d['authkey'] == 'authkey'
     assert d['authproto'] == 'md5'
     assert d['privkey'] == 'privkey'
     assert d['privproto'] == 'aes128'
Esempio n. 2
0
 def test_username_authkey(self):
     d = parse_authfile_line('username:authkey:')
     assert d['community'] == None
     assert d['username'] == 'username'
     assert d['authkey'] == 'authkey'
     assert d['authproto'] == None
     assert d['privkey'] == ''
     assert d['privproto'] == None
Esempio n. 3
0
 def test_community_leading_colon(self):
     d = parse_authfile_line(':community')
     assert d is None
Esempio n. 4
0
 def test_username(self):
     d = parse_authfile_line('username::')
     assert d['community'] == None
     assert d['username'] == 'username'
Esempio n. 5
0
 def test_community_trailing_colon(self):
     d = parse_authfile_line('community:')
     assert d is None