diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-25 20:13:10 -0700 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-03-25 20:13:47 -0700 |
commit | a3763450bcb4b606f08756478dffd5ab1175c9e0 (patch) | |
tree | d7ce0e9dd3dd6a8ecd116b90982538f866c77421 /multivimbroker | |
parent | 0b2cfa524556bf4e1541706ecb94e807cf0995bb (diff) |
Add test_getHeadersKeys
Add test_getHeadersKeys for syscomm.py
Change-Id: I462b65b13975f9943e77f061a2d2891eee01858b
Issue-ID: MULTICLOUD-198
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'multivimbroker')
-rw-r--r-- | multivimbroker/multivimbroker/tests/test_syscomm.py | 14 |
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)) |