appease flake8 somewhat
This commit is contained in:
parent
40dadfeb71
commit
3b7c9831f6
|
@ -45,6 +45,7 @@ class UnexpectedKCM(Exception):
|
|||
class UnknownMessageType(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def make_side():
|
||||
return bytes_to_hexstr(os.urandom(6))
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ def make_dilator():
|
|||
dil.wire(send)
|
||||
return dil, send, reactor, eq, clock, coop
|
||||
|
||||
|
||||
class TestDilator(unittest.TestCase):
|
||||
def test_manager_and_endpoints(self):
|
||||
dil, send, reactor, eq, clock, coop = make_dilator()
|
||||
|
@ -201,9 +202,11 @@ class TestDilator(unittest.TestCase):
|
|||
mock.call().start(),
|
||||
mock.call().when_first_connected()])
|
||||
|
||||
|
||||
LEADER = "ff3456abcdef"
|
||||
FOLLOWER = "123456abcdef"
|
||||
|
||||
|
||||
def make_manager(leader=True):
|
||||
class Holder:
|
||||
pass
|
||||
|
@ -220,6 +223,7 @@ def make_manager(leader=True):
|
|||
h.clock = Clock()
|
||||
h.eq = EventualQueue(h.clock)
|
||||
term = mock.Mock(side_effect=lambda: True) # one write per Eventual tick
|
||||
|
||||
def term_factory():
|
||||
return term
|
||||
h.coop = Cooperator(terminationPredicateFactory=term_factory,
|
||||
|
@ -236,6 +240,7 @@ def make_manager(leader=True):
|
|||
m = Manager(h.send, side, h.key, h.relay, h.reactor, h.eq, h.coop)
|
||||
return m, h
|
||||
|
||||
|
||||
class TestManager(unittest.TestCase):
|
||||
def test_make_side(self):
|
||||
side = make_side()
|
||||
|
|
Loading…
Reference in New Issue
Block a user