def test_expanded_list(self): """ Test that an expanded list dispatches. """ self.n = tracker.peer_list([("test1", "100.100.100.100", \ "1000")], False) self.assertEqual(self.n, [{'ip': '100.100.100.100', \ 'peer id': 'test1', 'port': 1000}])
def test_compact_list(self): """ Test that a compact peer list dispatches. """ self.n = tracker.peer_list([("test1", "100.100.100.100", \ "1000")], True) self.assertEqual(self.n, "dddd\x03\xe8")