summaryrefslogtreecommitdiff
path: root/tests/protocol/test_wire.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2017-07-03 13:44:00 +0200
committerusd-importer <ubuntu-server@lists.ubuntu.com>2017-07-03 12:23:41 +0000
commit43bdf9debe5377216aed0086bff2aad864f6ba82 (patch)
tree2db24e946e7b5b18c302c9d0a41c3e3ac5d52d5e /tests/protocol/test_wire.py
parent4fb0b5a09b26135ade285844da5d7dfe582a8d4c (diff)
downloadvyos-walinuxagent-43bdf9debe5377216aed0086bff2aad864f6ba82.tar.gz
vyos-walinuxagent-43bdf9debe5377216aed0086bff2aad864f6ba82.zip
Import patches-unapplied version 2.2.14-0ubuntu1 to ubuntu/artful-proposed
Imported using git-ubuntu import. Changelog parent: 4fb0b5a09b26135ade285844da5d7dfe582a8d4c New changelog entries: * New upstream release (LP: #1701350). * debian/copyright: - Refreshed copyright content.
Diffstat (limited to 'tests/protocol/test_wire.py')
-rw-r--r--tests/protocol/test_wire.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/protocol/test_wire.py b/tests/protocol/test_wire.py
index ba9fc7d..02976ca 100644
--- a/tests/protocol/test_wire.py
+++ b/tests/protocol/test_wire.py
@@ -80,26 +80,36 @@ class TestWireProtocolGetters(AgentTestCase):
url = testurl
headers = {}
- # no kwargs
+ # no kwargs -- Default to True
WireClient.call_storage_service(http_req)
- # kwargs, no chk_proxy
+
+ # kwargs, no chk_proxy -- Default to True
WireClient.call_storage_service(http_req,
url,
headers)
- # kwargs, chk_proxy False
+
+ # kwargs, chk_proxy None -- Default to True
+ WireClient.call_storage_service(http_req,
+ url,
+ headers,
+ chk_proxy=None)
+
+ # kwargs, chk_proxy False -- Keep False
WireClient.call_storage_service(http_req,
url,
headers,
chk_proxy=False)
- # kwargs, chk_proxy True
+
+ # kwargs, chk_proxy True -- Keep True
WireClient.call_storage_service(http_req,
url,
headers,
chk_proxy=True)
# assert
- self.assertTrue(http_patch.call_count == 4)
- for c in http_patch.call_args_list:
- self.assertTrue(c[-1]['chk_proxy'] == True)
+ self.assertTrue(http_patch.call_count == 5)
+ for i in range(0,5):
+ c = http_patch.call_args_list[i][-1]['chk_proxy']
+ self.assertTrue(c == (True if i != 3 else False))
def test_status_blob_parsing(self, *args):
wire_protocol_client = WireProtocol(wireserver_url).client