summaryrefslogtreecommitdiffstats
path: root/multivimbroker
diff options
context:
space:
mode:
Diffstat (limited to 'multivimbroker')
-rw-r--r--multivimbroker/multivimbroker/tests/test_syscomm.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/tests/test_syscomm.py b/multivimbroker/multivimbroker/tests/test_syscomm.py
index b80047d..1e88aa2 100644
--- a/multivimbroker/multivimbroker/tests/test_syscomm.py
+++ b/multivimbroker/multivimbroker/tests/test_syscomm.py
@@ -52,3 +52,15 @@ class TestSyscomm(unittest.TestCase):
vim = {"type": "openstack", "version": "titanium_cloud"}
ret = syscomm.findMultivimDriver(vim)
self.assertEqual("multicloud-titanium_cloud", ret)
+
+ def test_originHeaders(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": "token_1",
+ "NOT_STARTSWITH_HTTP": "value_1"
+ }
+ expect_headers = {
+ "X-AUTH-TOKEN": "token_1"
+ }
+ ret_headers = syscomm.originHeaders(req)
+ self.assertDictEqual(expect_headers, ret_headers)