Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable tests #619

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions tests/v3/compatibility_suite/test_v1_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import logging

import pytest
from pytest_bdd import given, parsers, scenario

from tests.v3.compatibility_suite.util import (
Expand Down Expand Up @@ -153,9 +152,6 @@ def test_request_with_invalid_body() -> None:
"""


# TODO: Enable this test when the upstream issue is resolved:
# https://github.com/pact-foundation/pact-compatibility-suite/issues/3
@pytest.mark.skip("Waiting on upstream fix")
@scenario(
"definition/features/V1/http_consumer.feature",
"Request with the incorrect type of body contents",
Expand Down Expand Up @@ -226,9 +222,6 @@ def test_request_with_xml_body_negative_case() -> None:
"""


# TODO: Enable this test when the upstream issue is resolved:
# https://github.com/pact-foundation/pact-reference/issues/336
@pytest.mark.skip("Waiting on upstream fix")
@scenario(
"definition/features/V1/http_consumer.feature",
"Request with a binary body (positive case)",
Expand All @@ -239,9 +232,6 @@ def test_request_with_a_binary_body_positive_case() -> None:
"""


# TODO: Enable this test when the upstream issue is resolved:
# https://github.com/pact-foundation/pact-reference/issues/336
@pytest.mark.skip("Waiting on upstream fix")
@scenario(
"definition/features/V1/http_consumer.feature",
"Request with a binary body (negative case)",
Expand Down
3 changes: 1 addition & 2 deletions tests/v3/compatibility_suite/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def __init__(self, data: str) -> None:

self.bytes = data.encode("utf-8")
self.string = data
self.mime_type = "text/plain"

def __repr__(self) -> str:
"""
Expand Down Expand Up @@ -311,7 +310,7 @@ def update(self, **kwargs: str) -> None: # noqa: C901, PLR0912
# the content type.
orig_content_type = self.body.mime_type if self.body else None
self.body = InteractionDefinition.Body(body)
self.body.mime_type = orig_content_type or self.body.mime_type
self.body.mime_type = self.body.mime_type or orig_content_type

if content_type := (
kwargs.pop("content_type", None) or kwargs.pop("content type", None)
Expand Down
Loading