I'm attempting to run a test suite. I am able to log in successfully, but when I request the first page, I get a broken unit test in contrib.auth. Here's the code:
from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User class ReportTest(TestCase): def test_report(self): """Render and download a sample report""" bob = User.objects.create_user("bob_the_tester", "b...@example.com", "b0...@$$") client = Client() login = client.login(username="bob_the_tester", password="b0...@$$") self.assertTrue(login) # passes, so login is good response = client.get('/') # adding this line causes the failures below and here are the failed tests: ====================================================================== FAIL: Doctest: django.contrib.auth.tests.__test__.FORM_TESTS ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/ django/test/_doctest.py", line 2180, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for django.contrib.auth.tests.__test__.FORM_TESTS File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/ django/contrib/auth/tests/__init__.py", line unknown line number, in FORM_TESTS ---------------------------------------------------------------------- File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/ django/contrib/auth/tests/__init__.py", line ?, in django.contrib.auth.tests.__test__.FORM_TESTS Failed example: form.save() Expected: <User: jsmi...@example.com> Got: <User: > ---------------------------------------------------------------------- Any ideas on what is causing this? Disabling custom auth backends doesn't fix the problem? I am aware of http://code.djangoproject.com/ticket/13394 but that is not what is causing this error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.