pytest-django could can't find modules correctly

31 Views Asked by At

I have a django project with a structure like below

project_root/
│
├── Tia/
│   ├── manage.py
│   ├── Tia/
│   │   ├── __init__.py
│   │   ├── my_settings.py
│   │   └── ...
│   └── repository/
│       ├── __init__.py
│       ├── tests/
│       └── ...
└── pytest.ini

I installed pytest-django and created a pytest.ini file. the context of the file are below:

[pytest]
DJANGO_SETTINGS_MODULE=MKalender.settings_local_prod_connection
python_files = tests.py test_*.py *_tests.py

Now I'm getting this Error when running the test only. runserver command works fine:

ModuleNotFoundError: No module named 'Tia.repository'

Any Idea on how to solve this?

0

There are 0 best solutions below