On 1/28/07, Andrew Durdin <[EMAIL PROTECTED]> wrote: > > > I'm trying to run all the django tests under Python 2.3.5 (on OS X > 10.4.8), and there are lots of failures (see below). > My settings file for the test is just: > > DEBUG = True > > DATABASE_ENGINE = 'mysql' # 'postgresql', 'mysql', 'sqlite3' > or 'ado_mssql'. > DATABASE_NAME = 'test' # Or path to database file if using > sqlite3. > DATABASE_USER = 'root' # Not used with sqlite3. > DATABASE_PASSWORD = '' # Not used with sqlite3. > DATABASE_HOST = '' # Set to empty string for localhost. > Not used with sqlite3. > DATABASE_PORT = '' # Set to empty string for default. Not > used with sqlite3. > > ROOT_URLCONF = None > > > Do these indicate something screwy with my setup, or do other 2.3.5 > users also get these? > > here's the test command and the full output: > > DJANGO_SETTINGS_MODULE=test_django.settings PYTHONPATH=~/django- > trunk:~/test_django ./tests/runtests.py > > ====================================================================== > ERROR: Request a page that is protected with @login, but use bad > credentials > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 101, in test_view_with_bad_login > self.assertFalse(response) > AttributeError: 'ClientTest' object has no attribute 'assertFalse' > > ====================================================================== > ERROR: Doctest: regressiontests.forms.tests > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/django/test/doctest.py", > line 2150, in runTest > failures, tries = runner.run( > File "/Users/andy/Projects/django-trunk/django/test/doctest.py", > line 1379, in run > return self.__run(test, compileflags, out) > File "/Users/andy/Projects/django-trunk/django/test/doctest.py", > line 1267, in __run > got += _exception_traceback(exc_info) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position > 254: ordinal not in range(128) > > ====================================================================== > FAIL: POST an empty dictionary to a view > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 53, in test_empty_post > self.assertEqual(response.status_code, 200) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 200 > > ====================================================================== > FAIL: GET a view that normally expects POSTs > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 45, in test_get_post_view > self.assertEqual(response.status_code, 200) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 200 > > ====================================================================== > FAIL: GET a view > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 35, in test_get_view > self.assertEqual(response.status_code, 200) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 200 > > ====================================================================== > FAIL: POST some data to a view > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 64, in test_post_view > self.assertEqual(response.status_code, 200) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 200 > > ====================================================================== > FAIL: GET a URL that redirects elsewhere > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 74, in test_redirect > self.assertEqual(response.status_code, 302) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 302 > > ====================================================================== > FAIL: GET an invalid URL > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 81, in test_unknown_page > self.assertEqual(response.status_code, 404) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 404 > > ====================================================================== > FAIL: Request a page that is protected with @login_required > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/Users/andy/Projects/django-trunk/tests/modeltests/test_client/ > models.py", line 88, in test_view_with_login > self.assertEqual(response.status_code, 302) > File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/unittest.py", line 302, in failUnlessEqual > raise self.failureException, \ > AssertionError: 500 != 302
I'm seeing the same amount of errors on python 2.3.4, it appears the @ decorator syntax is being used in the modeltests/test-client/views.py. This was introduced in python 2.4, I changed it to the old decorator syntax 'blah = decorator(blah)' and still recieved 3 errors. So I haven't tried any further. Robert ---------------------------------------------------------------------- > Ran 68 tests in 6.718s > > FAILED (failures=7, errors=2) > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
