Tests: Add info to assert_called failure message
This provides enough info to understand why this assertion is failing without having to attach a debugger. Change-Id: Ib042039d7589e7c86502ac15773fce995ff64bb9
This commit is contained in:
@@ -66,7 +66,10 @@ class FakeClient(object):
|
|||||||
expected + called)
|
expected + called)
|
||||||
|
|
||||||
if body is not None:
|
if body is not None:
|
||||||
assert self.client.callstack[pos][2] == body
|
actual_body = self.client.callstack[pos][2]
|
||||||
|
assert actual_body == body, ("body mismatch. expected:\n" +
|
||||||
|
str(body) + "\n" +
|
||||||
|
"actual:\n" + str(actual_body))
|
||||||
|
|
||||||
if partial_body is not None:
|
if partial_body is not None:
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user