What does “‘tests’ module incorrectly imported” mean?

In my experience, weird ImportErrors when running tests are caused by an ImportError in the tests module itself.

Ensure that your tests module can be imported:

$ python manage.py shell
...
>>> import foo.exports.tests

Edit:

If that causes an error, make sure you do not have both a directory foo/exports/tests and a file foo/exports/tests.py

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)