Skip to content
Permalink
Browse files

Merge branch '366-fixtest'

  • Loading branch information
warner committed Dec 21, 2019
2 parents dd52067 + a1420a0 commit dc26157906e12afc2ba69cce2b59a06e33e32f38
Showing with 6 additions and 6 deletions.
  1. +1 −1 src/wormhole/_dilation/manager.py
  2. +5 −5 src/wormhole/test/dilate/test_manager.py
@@ -92,7 +92,7 @@ def make_side():
# can send HINTS, but it must not be given any HINTS that arrive before
# RECONNECTING (since they're probably stale)

# * after VERSIONS(KCM) received, we might learn that they other side cannot
# * after VERSIONS(KCM) received, we might learn that the other side cannot
# dilate. w.dilate errbacks at this point

# * maybe signal warning if we stay in a "want" state for too long
@@ -237,16 +237,18 @@ def test_leader(self):
])
clear_mock_calls(h.inbound)

eps = m.get_endpoints()
self.assertTrue(hasattr(eps, "control"))
self.assertTrue(hasattr(eps, "connect"))
self.assertEqual(eps.listen, h.listen_ep)

m.got_wormhole_versions({"can-dilate": ["1"]})
self.assertEqual(h.send.mock_calls, [
mock.call.send("dilate-0",
dict_to_bytes({"type": "please", "side": LEADER}))
])
clear_mock_calls(h.send)

listen_d = m.get_endpoints().listen.listen(None)
self.assertNoResult(listen_d)

# ignore early hints
m.rx_HINTS({})
self.assertEqual(h.send.mock_calls, [])
@@ -267,8 +269,6 @@ def test_leader(self):
self.assertEqual(c.mock_calls, [mock.call.start()])
clear_mock_calls(connector, c)

self.assertNoResult(listen_d)

# now any inbound hints should get passed to our Connector
with mock.patch("wormhole._dilation.manager.parse_hint",
side_effect=["p1", None, "p3"]) as ph:

0 comments on commit dc26157

Please sign in to comment.
You can’t perform that action at this time.