Exemplo n.º 1
0
 def assertReactorProduces(self, input, expected):
     wrapped = self.R()
     reactor = LineAssemblerReporter(wrapped)
     reactor.start()
     for i in input:
         reactor.feed(i)
     reactor.stop(0)
     self.assertEqual(wrapped.input, expected)
Exemplo n.º 2
0
 def assertReactorProduces(self, input, expected):
     wrapped = self.R()
     reactor = LineAssemblerReporter(wrapped)
     reactor.start()
     for i in input:
         reactor.feed(i)
     reactor.stop(0)
     self.assertEqual(wrapped.input, expected)
Exemplo n.º 3
0
 def test_delegates_to_wrapped(self):
     wrapped = self.R()
     reactor = LineAssemblerReporter(wrapped)
     reactor.start()
     reactor.feed(b"hello world")
     reactor.stop(123)
     self.assert_(wrapped.start_called)
     self.assertEqual(wrapped.input, [b"hello world"])
     self.assertEqual(wrapped.code, 123)
Exemplo n.º 4
0
 def test_delegates_to_wrapped(self):
     wrapped = self.R()
     reactor = LineAssemblerReporter(wrapped)
     reactor.start()
     reactor.feed("hello world")
     reactor.stop(123)
     self.assert_(wrapped.start_called)
     self.assertEqual(wrapped.input, ["hello world"])
     self.assertEqual(wrapped.code, 123)