From 7976afafc407462d9fb326bdcd21351c0bd58b3a Mon Sep 17 00:00:00 2001 From: valkolovos Date: Sat, 3 Aug 2024 08:11:53 -0600 Subject: [PATCH] fix lint and test --- tests/v3/compatibility_suite/test_v3_http_matching.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/v3/compatibility_suite/test_v3_http_matching.py b/tests/v3/compatibility_suite/test_v3_http_matching.py index 976653935..aedc3c577 100644 --- a/tests/v3/compatibility_suite/test_v3_http_matching.py +++ b/tests/v3/compatibility_suite/test_v3_http_matching.py @@ -3,6 +3,7 @@ import pickle import re from pathlib import Path +from typing import Generator import pytest from pytest_bdd import ( @@ -125,7 +126,7 @@ def an_expected_request_with_header(name: str, value: str, temp_dir: Path) -> No @when("the request is compared to the expected one", target_fixture="provider_url") -def the_request_is_compared_to_the_expected_one(temp_dir: Path) -> None: +def the_request_is_compared_to_the_expected_one(temp_dir: Path) -> Generator[URL, None, None]: """The request is compared to the expected one.""" yield from start_provider(temp_dir) @@ -162,10 +163,12 @@ def the_comparison_should_not_be_ok( return verifier +# the mismatches will contain a mismatch with error "content-type" -> "Expected header 'content-type' to have value 'application/json;\s*charset=UTF-16' but was 'application/json;\s*charset=UTF-8'" +# the mismatches will contain a mismatch with error "{mismatch_key}" -> "Expected header '{header_name}' to have value '{expected_value}'but was '{actual_value}'" @then( parsers.parse( 'the mismatches will contain a mismatch with error "{mismatch_key}" ' - "-> \"Expected header '{header_name}' to have value '{expected_value}'" + "-> \"Expected header '{header_name}' to have value '{expected_value}' " "but was '{actual_value}'\"" ) )