about summary refs log tree commit diff
path: root/test/python
diff options
context:
space:
mode:
Diffstat (limited to 'test/python')
-rw-r--r--test/python/test_envelope.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/python/test_envelope.py b/test/python/test_envelope.py
index aa9ced3..c81e0a8 100644
--- a/test/python/test_envelope.py
+++ b/test/python/test_envelope.py
@@ -65,7 +65,20 @@ class EnvelopeTest(ServerTestCase):
             envelope["meta"]["request_id"], response.getheader("x-request-id")
         )
         self.assertEqual(envelope["notes"], [])
-        self.assertEqual(envelope["next"], [])
+        # /version used to carry no `next` links; the "always offer the next
+        # step" design gave every read endpoint some, so assert the shape --
+        # a list of {href, description} -- rather than emptiness. (This was
+        # stale in the repo and failed the package's own check phase, against
+        # a deployed build that had the links too.)
+        self.assertIsInstance(envelope["next"], list)
+        self.assertTrue(envelope["next"], "a read endpoint offers next steps")
+        for step in envelope["next"]:
+            self.assertIsInstance(step["href"], str)
+            self.assertIsInstance(step["description"], str)
+        self.assertTrue(
+            any(step["href"] == "/groups" for step in envelope["next"]),
+            envelope["next"],
+        )
 
     def test_errors_carry_the_request_id_and_took_ms(self):
         # The token extractor's 401: needs no database or gn-auth.