45👍
Just had this error, caused by an issue I had solved months ago and accidentally happened upon briefly again.
The problem is that when you specify the directory for django test you should use python notation for the directory, not standard shell notation. For example
Correct – project.tests.test_module
Incorrect – project/tests/test_module.py
5👍
I wasn’t able to explain WHY this is so, but when I ran the “python manage.py test list/” without specifying the file name, things worked perfectly well.
Thanks to user Ella Shar, I will be changing the scheme/layout I set my tests to the approved dotted format as described in the documentation
- [Django]-Django error: got multiple values for keyword argument
- [Django]-Serializer call is showing an TypeError: Object of type 'ListSerializer' is not JSON serializable?
- [Django]-With DEBUG=False, how can I log django exceptions to a log file
0👍
For me, it was a Database issue.
Apparently, the run stopped in the middle and he did not have time to delete the DB of the tests.
Deleting the DB test solves the issue
- [Django]-Getting Values of QuerySet in Django
- [Django]-Name '_' is not defined
- [Django]-Specifying limit and offset in Django QuerySet wont work