【发布时间】:2010-11-04 21:19:37
【问题描述】:
我正在使用 django-nonrel。当我在仅包含一个非常简单的用户定义测试的项目上运行manage.py test 时,我在输出中收到以下错误。有没有人见过这个?我需要做些什么来解决问题,以便test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests) 成功?
/src/google_appengine/google/appengine/datastore/datastore_stub_util.py:21: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/src/google_appengine/google/appengine/api/memcache/__init__.py:31: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/src/google_appengine/google/appengine/api/datastore_types.py:727: DeprecationWarning: object.__init__() takes no parameters
super(Email, self).__init__(self, email)
............................................s.................F.....................................................................................................
======================================================================
FAIL: test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/src/django/contrib/contenttypes/tests.py", line 66, in test_shortcut_view
self.assertEqual("http://example.com/users/john/", response._headers.get("location")[1])
AssertionError: 'http://example.com/users/john/' != '/users/john/'
----------------------------------------------------------------------
Ran 164 tests in 9.185s
FAILED (failures=1, skipped=1)
【问题讨论】:
标签: python django django-nonrel unit-testing