Skip to content
Advertisement

Tag: django-testing

Django test uses wrong database in some cases

I try to setup my Django tests, and I noticed that when I run all tests TestRunner uses correct test database (for all aliases): docker-compose exec my_project python manage.py test –keepdb But when I run tests for specific module, it uses the original database: docker-compose exec my_project python manage.py test –keepdb apps.my_module What is the reason of such behavior? Using

how do I efficiently test this Django model?

I’m building an authentication system for a website, I don’t have prior test experience with Django. I have written some basic tests. the model, and model manager, and my tests, fortunately all the passes, and my question is, are these tests overdone or underdone or normal? What should be tested in a model? is there any procedure missing? anything wrong

Advertisement