I'm using Django 1.3.0 with Python 2.7.1. In every test I write the following imports I get the importError above:
from django.utils import unittest from django.test.client import Client
The full stack trace:
File "C:\Program Files (x86)\j2ee\plugins\org.python.pydev.debug_1.6.3.2010100513\pysrc\runfiles.py", line 342, in __get_module_from_str mod = __import__(modname) File "C:/Users/benjamin/workspace/BookIt/src/BookIt/tests\basic_flow.py", line 11, in from django.test.client import Client File "C:\Python27\lib\site-packages\django\test\__init__.py", line 5, in from django.test.client import Client, RequestFactory File "C:\Python27\lib\site-packages\django\test\client.py", line 21, in from django.test import signals ImportError: cannot import name signals ERROR: Module: basic_flow could not be imported.
Any ideas why this happening ?
C:\Python27\lib\site-packages\django\test\__init__.py
and again in my testC:/Users/benjamin/workspace/BookIt/src/BookIt/tests\basic_flow.py
.If this is it, then how can import the Client to my test ? – Benjamin K.try
block, usingImportError
as your exception. – Chris Pratt