Police-Data-Accessibility-Project / data-sources-app

An API and UI for using and maintaining the Data Sources database
MIT License
4 stars 5 forks source link

Fix issue causing import error when running `/tests/test_schema_and_dto_logic.py` #474

Closed maxachis closed 2 weeks ago

maxachis commented 1 month ago

Context

I added tests which were not currently a part of the Github Actions tests to the run_pytest.yml file in a recent PR.

However, one minor set of tests failed due to an odd import issue:

Traceback (most recent call last):
  File "/home/runner/work/data-sources-app-v2/data-sources-app-v2/tests/test_schema_validation.py", line 6, in <module>
    from middleware.enums import JurisdictionType
ModuleNotFoundError: No module named 'middleware.enums'

This runs successfully on my local machine (#WorksOnMyMachine). For the moment, I removed that test, as it was a minor one, but ideally we want to fix this so that this runs without error.

Requirements

Tests

Docs

Open questions

maxachis commented 2 weeks ago

Thank goodness, this one was really annoying me.