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