Skip to content

Commit

Permalink
Switch urllib.parse to os.path
Browse files Browse the repository at this point in the history
  • Loading branch information
ways committed Oct 11, 2024
1 parent f9b1b41 commit b360b89
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sedr/schemat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import json
import schemathesis
Expand All @@ -6,7 +7,6 @@
from shapely.wkt import loads as wkt_loads
import pytest
import requests
import urllib.parse

import util
import edreq11 as edreq
Expand Down Expand Up @@ -77,9 +77,10 @@ def after_call(context, case, response):
+ f"{response.request.path_url} {response.text[0:150]}"
)

test = os.path.join(util.args.base_path, "conformance")

@schema.include(
path_regex="^" + urllib.parse.urljoin(util.args.base_path, "/conformance")
path_regex="^" + os.path.join(util.args.base_path, "conformance")
).parametrize()
@settings(max_examples=util.args.iterations, deadline=None)
def test_edr_conformance(case):
Expand Down Expand Up @@ -162,7 +163,7 @@ def test_edr_landingpage(case):
raise AssertionError(requirement7_2_message)


@schema.include(path_regex="^" + urllib.parse.urljoin(util.args.base_path, "collections$")).parametrize()
@schema.include(path_regex="^" + os.path.join(util.args.base_path, "collections$")).parametrize()
@settings(max_examples=util.args.iterations, deadline=None)
def test_edr_collections(case):
"""The default testing in function test_api() will fuzz the collections. This function will test that collections contain EDR spesifics. It will also require /collections to exist, in accordance with Requirement A.2.2 A.9
Expand Down

0 comments on commit b360b89

Please sign in to comment.