diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-10 10:05:10 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-10 10:05:10 +0200 |
commit | ea3300de1269c1c2e1fe76f6a6dec534936cc303 (patch) | |
tree | d3f7690266ca04c3a3d99444880d2c64972dc23f /tests/test_json_instances.py | |
parent | b2055032cb914fd160270971dd1da46f8c7c838d (diff) | |
download | haketilo-hydrilla-ea3300de1269c1c2e1fe76f6a6dec534936cc303.tar.gz haketilo-hydrilla-ea3300de1269c1c2e1fe76f6a6dec534936cc303.zip |
[builder][server] fix old tests
Diffstat (limited to 'tests/test_json_instances.py')
-rw-r--r-- | tests/test_json_instances.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_json_instances.py b/tests/test_json_instances.py index f5bd270..fd09ce1 100644 --- a/tests/test_json_instances.py +++ b/tests/test_json_instances.py @@ -7,7 +7,7 @@ import pytest import re -from hydrilla import json_instances +from hydrilla import json_instances, versions from hydrilla.exceptions import HaketiloException sample_json_no_comments = '{\n"so/me":\n"//json//"\n}\n' @@ -113,7 +113,7 @@ def test_read_instance_bad(monkeypatch, tmpdir): somepath = tmpdir / 'somefile' somepath.write_text('dummy_JSON_text') - error_regex = f'^text_in_{re.escape(str(somepath))}_not_valid_json$' + error_regex = f'^err.util.text_in_{re.escape(str(somepath))}_not_valid_json$' with pytest.raises(HaketiloException, match=error_regex): json_instances.read_instance(somepath) @@ -124,12 +124,12 @@ def test_read_instance_bad(monkeypatch, tmpdir): ]) def test_get_schema_version(instance, ver_str, monkeypatch): """....""" - def mocked_parse_version(_ver_str): + def mocked_parse_normalize(_ver_str): """....""" assert _ver_str == ver_str return 'dummy_version' - monkeypatch.setattr(json_instances, 'parse_version', mocked_parse_version) + monkeypatch.setattr(versions, 'parse_normalize', mocked_parse_normalize) assert json_instances.get_schema_version(instance) == 'dummy_version' |