lundi 22 janvier 2018

How to edit path for django unit tests?

I'm trying to run the standard 'python manage.py test` however I'm getting a:

`ImportError: No module named 'draft1.app'` for all 9 of my apps in my project (9 errors). 

Full error example:

ImportError: Failed to import test module: draft1.profiles
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
ImportError: No module named 'draft1.profiles'

My project tree is:

/draft1
    /draft1
    /profiles 
    ...    
    /bin
    /lib
    /include

Any idea what the problem is?

Aucun commentaire:

Enregistrer un commentaire