diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 25cde07..2b222bb 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.11' cache: pip cache-dependency-path: '**/requirements*.txt' - name: InstallCommon @@ -48,7 +48,8 @@ jobs: - name: Test cove instance run: | cd cove-${{ matrix.cove }} - DJANGO_SETTINGS_MODULE=cove_project.settings py.test + ./manage.py collectstatic --noinput -v2 + DJANGO_SETTINGS_MODULE=core.settings py.test - name: Test cove lib instance run: | diff --git a/tests/lib/test_common.py b/tests/lib/test_common.py index 2a45fd6..32510d5 100644 --- a/tests/lib/test_common.py +++ b/tests/lib/test_common.py @@ -1183,18 +1183,23 @@ def common_fixtures(filename): def test_get_field_coverage_oc4ids(): # Compare the actual json output, to ensure order is the same - assert ( - json.dumps( - get_field_coverage( - schema_obj_from_str( - open(common_fixtures("oc4ids_project-schema_0__9__2.json")).read() + with open( + common_fixtures("oc4ids_example_coverage.json") + ) as schema_file_with_coverage, open( + common_fixtures("oc4ids_project-schema_0__9__2.json") + ) as schema_file, open( + common_fixtures("oc4ids_example.json") + ) as data_file: + assert ( + json.dumps( + get_field_coverage( + schema_obj_from_str(schema_file.read()), + json.load(data_file)["projects"], ), - json.load(open(common_fixtures("oc4ids_example.json")))["projects"], - ), - indent=2, + indent=2, + ) + == schema_file_with_coverage.read() ) - == open(common_fixtures("oc4ids_example_coverage.json")).read() - ) @pytest.mark.parametrize(