예제 #1
0
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
예제 #2
0
파일: text.py 프로젝트: preoctopus/err
 def build_identifier(self, text_representation):
     return SimpleIdentifier(text_representation)
예제 #3
0
 def test_identifier_ineq(self):
     a = SimpleIdentifier("foo")
     b = SimpleIdentifier("bar")
     self.assertFalse(a == b)
     self.assertNotEqual(a, b)
예제 #4
0
 def test_identifier_eq(self):
     a = SimpleIdentifier("foo")
     b = SimpleIdentifier("foo")
     self.assertTrue(a == b)
     self.assertEqual(a, b)
예제 #5
0
 def build_identifier(self, strrep):
     return SimpleIdentifier(strrep)