From 4332f055253f95788ecdea78b0be85083fb14c99 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Wed, 20 Mar 2024 14:29:16 +1100 Subject: [PATCH] chore(tests): re-enable warning check Following recommendations from Ron, making the check a no-op. Ref: pact-foundation/pact-reference#404 Signed-off-by: JP-Ellis --- tests/v3/compatibility_suite/test_v1_provider.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/v3/compatibility_suite/test_v1_provider.py b/tests/v3/compatibility_suite/test_v1_provider.py index f795f3ce05..359d135f9a 100644 --- a/tests/v3/compatibility_suite/test_v1_provider.py +++ b/tests/v3/compatibility_suite/test_v1_provider.py @@ -126,9 +126,6 @@ def test_verifying_an_interaction_where_the_provider_state_callback_fails() -> N """Verifying an interaction where the provider state callback fails.""" -# TODO: Enable this test once we can capture warnings -# https://github.com/pact-foundation/pact-reference/issues/404 -@pytest.mark.skip("Unable to get warnings to be captured") @scenario( "definition/features/V1/http_provider.feature", "Verifying an interaction where a provider state callback is not configured", @@ -860,18 +857,13 @@ def the_provider_state_callback_will_be_called_after_the_verification_is_run() - ) ) def a_warning_will_be_displayed_that_there_was_no_callback_configured( - verifier_result: tuple[Verifier, Exception | None], - state: str, # noqa: ARG001 + state: str, ) -> None: """ Check that a warning was displayed that there was no callback configured. """ logger.debug("Checking for warning about missing provider state callback") - verifier = verifier_result[0] - logger.debug("verifier output: %s", verifier.output(strip_ansi=True)) - logger.debug("verifier results: %s", json.dumps(verifier.results, indent=2)) - msg = "Not implemented" - raise NotImplementedError(msg) + assert state @then(