How do I use PyMock and Nose with Django models?
I'm trying to do TDD with PyMock, but I keep getting the error when I use Nose and run core.py from the command line:
"ERROR: Failure: ImportError (Parameters cannot be imported because the DJA environment variable NGO_SETTINGS_MODULE is undefined.)"
If I remove "from insert cms.models import" from the unit test module I created, everything works fine, but I need to mock the functionality in the django cms.models.Entry module that I created.
What am I doing wrong? It can be done?
+2
source to share