Skip to content
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
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ addopts = """
--cov-report=term-missing
--cov-report=xml
"""
markers = [
"network: marks tests which do need network-enabled environment",
]

[tool.black]
line-length = 79
Expand Down
12 changes: 7 additions & 5 deletions tests/integration/test_shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_spec_schema_version_not_detected(self):
validate_spec(spec)


class TestValidateSpecUrl:
class TestLocalValidateSpecUrl:
def test_spec_schema_version_not_detected(self, factory):
spec_path = "data/empty.yaml"
spec_url = factory.spec_file_url(spec_path)
Expand All @@ -31,7 +31,7 @@ def test_spec_schema_version_not_detected(self, factory):
validate_spec_url(spec_url)


class TestValidatev2Spec:
class TestLiocalValidatev2Spec:

LOCAL_SOURCE_DIRECTORY = "data/v2.0/"

Expand Down Expand Up @@ -68,7 +68,7 @@ def test_falied(self, factory, spec_file):
validate_v2_spec(spec)


class TestValidatev30Spec:
class TestLocalValidatev30Spec:

LOCAL_SOURCE_DIRECTORY = "data/v3.0/"

Expand Down Expand Up @@ -105,7 +105,8 @@ def test_falied(self, factory, spec_file):
validate_v30_spec(spec)


class TestValidatev2SpecUrl:
@pytest.mark.network
class TestRemoteValidatev2SpecUrl:

REMOTE_SOURCE_URL = (
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/"
Expand Down Expand Up @@ -134,7 +135,8 @@ def test_valid(self, spec_file):
validate_spec_url_factory(openapi_v2_spec_validator)(spec_url)


class TestValidatev30SpecUrl:
@pytest.mark.network
class TestRemoteValidatev30SpecUrl:

REMOTE_SOURCE_URL = (
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/"
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/validation/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_falied(self, factory, validator_v30, spec_file):
validator_v30.validate(spec, spec_url=spec_url)


@pytest.mark.network
class TestRemoteOpenAPIv30Validator:

REMOTE_SOURCE_URL = (
Expand Down Expand Up @@ -67,6 +68,7 @@ def test_valid(self, factory, validator_v30, spec_file):
return validator_v30.validate(spec, spec_url=spec_url)


@pytest.mark.network
class TestRemoteOpeAPIv31Validator:

REMOTE_SOURCE_URL = (
Expand Down