I'm trying to configure pytest for the first time.
When I run the command:
python -m pytestI get the following error:
ImportError: No module named 'Socialmedia.settings.local'; 'Socialmedia.settings' is not a packagepytest-django found a Django project in C:\Users\Alon\PycharmProjects\Socialmedia (it contains manage.py) and added it to the Python path.If this is wrong, add "django_find_project = false" to pytest.ini and explicitly manage your Python path.pytest file:
[pytest]DJANGO_SETTINGS_MODULE = Socialmedia.settings.localpython_files = test_*.pyLooks like the error is caused due to socialmedia not being recognized.
I tried:
Changing init file and adding the module there.
import Socialmediafrom Socialmedia import settings__all__ = [Socialmedia, settings]Moving to another directory from the project to the app.
the following picture shows how it looks like
Any idea how to make socialmedia accessible in this file?