From 117bf196e195c758ca53fda3f9ab974767bfa90c Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 31 May 2022 21:27:41 +0200 Subject: add test case for unknown schema version error --- tests/test_build.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_build.py b/tests/test_build.py index 0d3e662..a636488 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -706,6 +706,15 @@ def sample_source_error_index_schema(monkeypatch, sample_source): monkeypatch.delitem(index_obj, 'definitions') return ValidationError, +@collect(error_makers) +def sample_source_error_unknown_index_schema(monkeypatch, sample_source): + """Modify index.json to be use a not-yet-released schema.""" + schema_id = \ + 'https://hydrilla.koszko.org/schemas/package_source-65536.schema.json' + monkeypatch.setitem(index_obj, "$schema", schema_id) + return hydrilla_util.UnknownSchemaError, \ + r'^unknown_schema_package_source_.*/hello/index\.json$' + @collect(error_makers) def sample_source_error_bad_comment(monkeypatch, sample_source): """Modify index.json to have an invalid '/' in it.""" -- cgit v1.2.3