1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

feat(failure-message): reformat the message with the best requests matches (#459)

The message is less verbose and the display is improved for a better readability.
This commit is contained in:
Arthur Hamon
2019-08-06 01:57:13 +02:00
committed by Josh Peak
parent e3b7116564
commit caa3a67bde
4 changed files with 94 additions and 32 deletions

View File

@@ -204,17 +204,13 @@ def test_evaluate_matcher_does_not_match_with_assert_message():
def test_get_assertion_message():
assert matchers.get_assertion_message(None) == ""
assert matchers.get_assertion_message(None) is None
assert matchers.get_assertion_message("") == ""
def test_get_assertion_message_with_details():
assertion_msg = "q1=1 != q2=1"
expected = (
"--------------- DETAILS ---------------\n"
"{}\n"
"----------------------------------------\n".format(assertion_msg)
)
expected = assertion_msg
assert matchers.get_assertion_message(assertion_msg) == expected