Merge branch '366-fixtest'
This commit is contained in:
commit
dc26157906
|
@ -92,7 +92,7 @@ def make_side():
|
||||||
# can send HINTS, but it must not be given any HINTS that arrive before
|
# can send HINTS, but it must not be given any HINTS that arrive before
|
||||||
# RECONNECTING (since they're probably stale)
|
# 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
|
# dilate. w.dilate errbacks at this point
|
||||||
|
|
||||||
# * maybe signal warning if we stay in a "want" state for too long
|
# * maybe signal warning if we stay in a "want" state for too long
|
||||||
|
|
|
@ -237,6 +237,11 @@ class TestManager(unittest.TestCase):
|
||||||
])
|
])
|
||||||
clear_mock_calls(h.inbound)
|
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"]})
|
m.got_wormhole_versions({"can-dilate": ["1"]})
|
||||||
self.assertEqual(h.send.mock_calls, [
|
self.assertEqual(h.send.mock_calls, [
|
||||||
mock.call.send("dilate-0",
|
mock.call.send("dilate-0",
|
||||||
|
@ -244,9 +249,6 @@ class TestManager(unittest.TestCase):
|
||||||
])
|
])
|
||||||
clear_mock_calls(h.send)
|
clear_mock_calls(h.send)
|
||||||
|
|
||||||
listen_d = m.get_endpoints().listen.listen(None)
|
|
||||||
self.assertNoResult(listen_d)
|
|
||||||
|
|
||||||
# ignore early hints
|
# ignore early hints
|
||||||
m.rx_HINTS({})
|
m.rx_HINTS({})
|
||||||
self.assertEqual(h.send.mock_calls, [])
|
self.assertEqual(h.send.mock_calls, [])
|
||||||
|
@ -267,8 +269,6 @@ class TestManager(unittest.TestCase):
|
||||||
self.assertEqual(c.mock_calls, [mock.call.start()])
|
self.assertEqual(c.mock_calls, [mock.call.start()])
|
||||||
clear_mock_calls(connector, c)
|
clear_mock_calls(connector, c)
|
||||||
|
|
||||||
self.assertNoResult(listen_d)
|
|
||||||
|
|
||||||
# now any inbound hints should get passed to our Connector
|
# now any inbound hints should get passed to our Connector
|
||||||
with mock.patch("wormhole._dilation.manager.parse_hint",
|
with mock.patch("wormhole._dilation.manager.parse_hint",
|
||||||
side_effect=["p1", None, "p3"]) as ph:
|
side_effect=["p1", None, "p3"]) as ph:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user