1👍
you didn’t provide the full picture of the project structure so I am going to pin point what would usually cause this problem :
1. install pytest-django
$ pipenv install --dev pytest-django
2. create a file to define the settings module, and name it
pytest.ini
[pytest] DJANGO_SETTINGS_MODULE=storefront.settings
replace "storefront" with your root folder and make sure the spelling is right , also this file should be on the root directory along side with the manage.py
file .
3. in the terminal type pytest , remember to execute this command in the root directory (the same place you $ python manage.py runserver
)
- [Django]-Django logging error when using daemonize
- [Django]-Can this variable really be "referenced before assignment"
-2👍
check your installed apps in the project settings file and ensure that you have the REST_FRAMEWORK
added and it doesn’t contain duplicates or other errors
- [Django]-How can I use Flex to access foreign-keyed fields in Django?
- [Django]-AttributeError: 'SigSafeLogger' object has no attribute 'logger'
- [Django]-Filtering out specific Python logging messages
- [Django]-Any clue on this error with generic relation using Django Orm?
Source:stackexchange.com