summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multivimbroker/multivimbroker/tests/test_syscomm.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/multivimbroker/multivimbroker/tests/test_syscomm.py b/multivimbroker/multivimbroker/tests/test_syscomm.py
index 1e88aa2..e28c2c7 100644
--- a/multivimbroker/multivimbroker/tests/test_syscomm.py
+++ b/multivimbroker/multivimbroker/tests/test_syscomm.py
@@ -64,3 +64,17 @@ class TestSyscomm(unittest.TestCase):
}
ret_headers = syscomm.originHeaders(req)
self.assertDictEqual(expect_headers, ret_headers)
+
+ def test_getHeadersKeys_no_connection(self):
+ resp = {}
+ self.assertEqual([], syscomm.getHeadersKeys(resp))
+
+ def test_getHeadersKeys_with_connection(self):
+ resp = {
+ "connection": "aa,bb",
+ "keep-alive": "yes",
+ "aa": "vaa",
+ "bb": "vbb",
+ "cc": "vcc"
+ }
+ self.assertEqual(["cc"], syscomm.getHeadersKeys(resp))