def test_streaming(): canary = b'this is my test' * 1000 source = Stream(SimpleIdentifier("*****@*****.**"), BytesIO(canary)) clients = [StreamingClient() for i in range(50)] Tee(source, clients).run() for client in clients: assert client.response == canary
def build_identifier(self, text_representation): return SimpleIdentifier(text_representation)
def test_identifier_ineq(self): a = SimpleIdentifier("foo") b = SimpleIdentifier("bar") self.assertFalse(a == b) self.assertNotEqual(a, b)
def test_identifier_eq(self): a = SimpleIdentifier("foo") b = SimpleIdentifier("foo") self.assertTrue(a == b) self.assertEqual(a, b)
def build_identifier(self, strrep): return SimpleIdentifier(strrep)