summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_system.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_system.py b/test/apiv2/python/rest_api/test_v2_0_0_system.py
index 3dfd08525..2d3935c9c 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_system.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_system.py
@@ -1,5 +1,6 @@
import json
import unittest
+import uuid
import requests
from .fixtures import APITestCase
@@ -92,6 +93,18 @@ class SystemTestCase(APITestCase):
r = requests.get(self.uri("/system/df"))
self.assertEqual(r.status_code, 200, r.text)
+ def test_reference_id(self):
+ rid = str(uuid.uuid4())
+ r = requests.get(self.uri("/info"), headers={"X-Reference-Id": rid})
+ self.assertEqual(r.status_code, 200, r.text)
+
+ self.assertIn("X-Reference-Id", r.headers)
+ self.assertEqual(r.headers["X-Reference-Id"], rid)
+
+ r = requests.get(self.uri("/info"))
+ self.assertIn("X-Reference-Id", r.headers)
+ self.assertNotEqual(r.headers["X-Reference-Id"], rid)
+
if __name__ == "__main__":
unittest.main()