def test_nick_without_ident(self): result = nick('~nickname@hostname') expected = { 'nick': 'nickname', 'ident': None, 'host': 'hostname', } self.assertEqual(result, expected)
def test_nick_with_ident(self): result = nick('nickname!ident@hostname') expected = { 'nick': 'nickname', 'ident': 'ident', 'host': 'hostname', } self.assertEqual(result, expected)