def test_body_match_does_not_match(r1, r2): with pytest.raises(AssertionError): matchers.body(r1, r2)
def test_body_matcher_does_match(r1, r2): assert matchers.body(r1, r2) is None
def test_body_match_does_not_match(r1, r2): assert not matchers.body(r1, r2)
def test_body_matcher_does_match(r1, r2): assert matchers.body(r1, r2)
def extended_vcr_body_matcher(received_request, cassette_request): with signal_context( "additional_body_matching", dict(cassette_request=cassette_request, received_request=received_request)) as body_matched: return body_matched or body(cassette_request, received_request)