diff --git a/img/README.md b/img/README.md new file mode 100644 index 0000000..7bd783a --- /dev/null +++ b/img/README.md @@ -0,0 +1,3 @@ +# Icon + +from diff --git a/sedr/schemat.py b/sedr/schemat.py index 6ec5480..c8d0dac 100644 --- a/sedr/schemat.py +++ b/sedr/schemat.py @@ -37,10 +37,6 @@ def set_up_schemathesis(args): schema = set_up_schemathesis(util.args) -# Require /collections to exist, in accordance with Requirement A.2.2 A.9 -# -_ = schema["/collections"]["GET"] - @schema.parametrize() # parametrize => Create tests for all operations in schema @settings(max_examples=util.args.iterations, deadline=None) @@ -136,15 +132,16 @@ def test_conformance(case): util.logger.debug("Conformance %s tested OK", response.url) -@schema.parametrize() +@schema.include(path_regex="^" + util.args.base_path + "collections$").parametrize() @settings(max_examples=util.args.iterations, deadline=None) def test_collections(case): - """The default testing in function test_api() will fuzz the collections. This function will test that collections contain EDR spesifics.""" + """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 + + """ global collection_ids, extents - if not case.path.endswith("/collections"): - return - response = case.call() spec_ref = "https://docs.ogc.org/is/19-086r6/19-086r6.html#_ed0b4d0d-f90a-4a7d-a123-17a1d7849b2d" @@ -183,7 +180,7 @@ def test_collections(case): f"Unable to find extent for collection ID {collection['id']}. Found [{', '.join(collection.keys())}]. See {spec_ref} for more info." ) from err - util.logger.debug("Collections %s tested OK", response.url) + # util.logger.debug("Collections %s tested OK", response.url) # @schema.parametrize() diff --git a/sedr/test_util.py b/sedr/test_util.py index d0f749a..01cf50c 100644 --- a/sedr/test_util.py +++ b/sedr/test_util.py @@ -8,6 +8,7 @@ class TestUtil(unittest.TestCase): def test_parse_landing_json(self): + """Test parsing a generic landing page in json.""" with open("../testdata/landingpage.json", "r", encoding="utf-8") as f: landingpage_json = json.loads(f.read()) landing, _ = util.parse_landing_json(landingpage_json)