Something similar happened to me and the answer has to do with __init__.py
, however, it depends on how you have structured your project, in my case, I had something like this:
├── apps
│ ├── app1
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ ├── test/
│ │ │ ├── test_models.py
│ │ ├── models.py
│ │ ├── views.py
│ ├── app2
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ ├── test.py
│ │ ├── models.py
│ │ ├── views.py
.
.
.
Getting:
Ran 0 tests in 0.000s
The solution to this was to add __init__.py
inside the tests folder and inside the apps folder. The structure is as follows:
├── apps
│ ├── __init__.py **
│ ├── app1
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ ├── test/
│ │ │ ├── __init__.py **
│ │ │ ├── test_models.py
│ │ ├── models.py
│ │ ├── views.py
│ ├── app2
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── migrations/
│ │ ├── test.py
│ │ ├── models.py
│ │ ├── views.py
│ ├── app2
.
.
.
I hope this can help someone else.