I'm using Python 3.8 and Django 3. I have the following directory structure ...
- manage.py
+ tests
- __init__.py
- factories.py
- test_models.py
- test_serializers.py
+ directory
- test_settings.py
I launch my tests using
python manage.py test --settings=directory.test_settings
Below are teh contents of my "test_settings.py" file ...
from .settings import *
class DisableMigrations(object):
# ref: https://stackoverflow.com/a/28560805/12578202
def __contains__(self, item):
return True
def __getitem__(self, item):
return None
How do I configure my test settings file above to be default so that I can run tests simply by doing
python manage.py test