aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/test_offline.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_offline.py b/tests/test_offline.py
index dfb9965..19d9cee 100644
--- a/tests/test_offline.py
+++ b/tests/test_offline.py
@@ -65,7 +65,14 @@ class NothingOpensASocket(unittest.TestCase):
iocs, bootstraps=bootstraps,
fetch=lambda url: {"handle": "NET-1", "entities": []},
)
+ # Assert on the handle the injected fetch produced, not merely on
+ # the length. resolve() records a transport failure as a per-entry
+ # error rather than raising, so an entry exists either way: a test
+ # counting entries would stay green if the injection were removed
+ # and the real transport were blocked, which is the one thing this
+ # test is here to notice.
self.assertEqual(len(result), 1)
+ self.assertEqual(result[0]["handle"], "NET-1")
def test_the_real_transport_is_never_the_default_in_a_test(self):
"""Sanity: http_fetch exists and is the documented default."""