mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 11:16:41 +00:00
get rid of flush() calls
This commit is contained in:
parent
811c7ea434
commit
d2ea9c5158
@ -5,7 +5,7 @@ from twisted.internet.defer import inlineCallbacks, Deferred
|
|||||||
|
|
||||||
from eliot import log_call
|
from eliot import log_call
|
||||||
|
|
||||||
from autobahn.twisted.testing import create_memory_agent, MemoryReactorClockResolver
|
from autobahn.twisted.testing import create_memory_agent, MemoryReactorClockResolver, create_pumper
|
||||||
from autobahn.twisted.websocket import WebSocketServerProtocol
|
from autobahn.twisted.websocket import WebSocketServerProtocol
|
||||||
from autobahn.twisted.websocket import WebSocketClientProtocol
|
from autobahn.twisted.websocket import WebSocketClientProtocol
|
||||||
|
|
||||||
@ -21,7 +21,12 @@ class TestStreamingLogs(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.reactor = MemoryReactorClockResolver()
|
self.reactor = MemoryReactorClockResolver()
|
||||||
self.agent = create_memory_agent(self.reactor, TokenAuthenticatedWebSocketServerProtocol)
|
self.pumper = create_pumper()
|
||||||
|
self.agent = create_memory_agent(self.reactor, self.pumper, TokenAuthenticatedWebSocketServerProtocol)
|
||||||
|
return self.pumper.start()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
return self.pumper.stop()
|
||||||
|
|
||||||
@inlineCallbacks
|
@inlineCallbacks
|
||||||
def test_one_log(self):
|
def test_one_log(self):
|
||||||
@ -44,7 +49,6 @@ class TestStreamingLogs(unittest.TestCase):
|
|||||||
do_a_thing()
|
do_a_thing()
|
||||||
|
|
||||||
proto.transport.loseConnection()
|
proto.transport.loseConnection()
|
||||||
self.agent.flush()
|
|
||||||
yield proto.is_closed
|
yield proto.is_closed
|
||||||
|
|
||||||
self.assertEqual(len(messages), 2)
|
self.assertEqual(len(messages), 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user