summaryrefslogtreecommitdiff
path: root/tests/protocol/test_wire.py
diff options
context:
space:
mode:
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