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'
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
def test_community_leading_colon(self): d = parse_authfile_line(':community') assert d is None
def test_username(self): d = parse_authfile_line('username::') assert d['community'] == None assert d['username'] == 'username'
def test_community_trailing_colon(self): d = parse_authfile_line('community:') assert d is None