Skip to content

Commit 905c8d4

Browse files
committed
rm old tests
1 parent 00087d0 commit 905c8d4

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

api/tests/test_conventions_openapi.py

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from utils import list_files_in_api_specs
1010
from yarl import URL
1111

12+
13+
1214
# Conventions
1315
_REQUIRED_FIELDS = [
1416
"data",
@@ -42,29 +44,3 @@ def test_openapi_envelope_required_fields(path: Path):
4244

4345
assert "error" in required_fields or "data" in required_fields
4446
assert "error" in fields_definitions or "data" in fields_definitions
45-
46-
47-
main_openapi_yamls = [
48-
pathstr
49-
for pathstr in list_files_in_api_specs("openapi.y*ml")
50-
if not f"{pathstr}".endswith(CONVERTED_SUFFIX) and ("director" not in f"{pathstr}")
51-
] # skip converted schemas and director
52-
53-
assert main_openapi_yamls
54-
55-
56-
@pytest.mark.parametrize(
57-
"openapi_path", main_openapi_yamls, ids=lambda p: p.parent.name
58-
)
59-
def test_versioning_and_basepath(openapi_path: Path):
60-
# version in folder name is only major!
61-
with openapi_path.open() as f:
62-
oas_dict = yaml.safe_load(f)
63-
64-
# basepath in servers must also be as '/v0'
65-
for server in oas_dict["servers"]:
66-
kwargs = {
67-
key: value["default"] for key, value in server.get("variables", {}).items()
68-
}
69-
url = URL(server["url"].format(**kwargs))
70-
assert url.path == "/", "Wrong basepath in server: %s" % server

0 commit comments

Comments
 (0)