appease flake8 somewhat

This commit is contained in:
Brian Warner 2018-12-21 21:54:17 -05:00
parent 40dadfeb71
commit 3b7c9831f6
2 changed files with 37 additions and 31 deletions

View File

@ -45,6 +45,7 @@ class UnexpectedKCM(Exception):
class UnknownMessageType(Exception):
pass
def make_side():
return bytes_to_hexstr(os.urandom(6))

View File

@ -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()