summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Ke <lokyse@163.com>2018-03-26 04:11:51 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-26 04:11:51 +0000
commitacffd04f08606b905a63d91ba4f3ae3bb340b1da (patch)
tree1f5280ef85dd7e2fabdbbc93eaa4e7cbd20d579c
parentb3398d2b776f532004dbcd975633d79bb2ca246d (diff)
parenta3763450bcb4b606f08756478dffd5ab1175c9e0 (diff)
Merge "Add test_getHeadersKeys"
-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))