Fix mock==1.1.0 break test_raw_request_chunked
assert_call_count is not support in mock=1.1.0
change assert_call_count statement to 2 steps:
1. get the call count
2. use assertEqual instead
Change-Id: I15cade184403bcbd75f50f1f2074cebc924a96d3
Closes-Bug: #1473309
diff --git a/tempest/tests/test_glance_http.py b/tempest/tests/test_glance_http.py
index 7850ee4..71aa395 100644
--- a/tempest/tests/test_glance_http.py
+++ b/tempest/tests/test_glance_http.py
@@ -137,7 +137,8 @@
resp, body = self.client.raw_request('PUT', '/images', body=req_body)
self.assertEqual(200, resp.status)
self.assertEqual('fake_response_body', body.read())
- httplib.HTTPConnection.send.assert_call_count(req_body.tell())
+ call_count = httplib.HTTPConnection.send.call_count
+ self.assertEqual(call_count - 1, req_body.tell())
def test_get_connection_class_for_https(self):
conn_class = self.client.get_connection_class('https')