diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-05-31 21:27:41 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-05-31 21:27:41 +0200 |
commit | 117bf196e195c758ca53fda3f9ab974767bfa90c (patch) | |
tree | 59b89596d0d9392c097e62d66db25bad0bb14954 | |
parent | 7d272015600718162547f78befa42bf71a81984e (diff) | |
download | hydrilla-builder-117bf196e195c758ca53fda3f9ab974767bfa90c.tar.gz hydrilla-builder-117bf196e195c758ca53fda3f9ab974767bfa90c.zip |
add test case for unknown schema version error
-rw-r--r-- | tests/test_build.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -707,6 +707,15 @@ def sample_source_error_index_schema(monkeypatch, sample_source): 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.""" return json.JSONDecodeError, '^bad_comment: .*', \ |