Skip to content

Commit

Permalink
fix lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
valkolovos committed Aug 3, 2024
1 parent 53e058f commit 7976afa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/v3/compatibility_suite/test_v3_http_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pickle
import re
from pathlib import Path
from typing import Generator

import pytest
from pytest_bdd import (
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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}'\""
)
)
Expand Down

0 comments on commit 7976afa

Please sign in to comment.