id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 12082 Inclusion of new auth tests force Sites framework requirement Farhan Ahmad nobody "After upgrading to 1.1.1 I noticed that the inclusion of auth tests (specifically django.contrib.auth.tests.views.LoginTest imported in source:django/trunk/django/contrib/auth/tests/__init__.py) cause the test framework to throw an exception if you are not using the Sites framework. Here is the exception raised, which includes the specific references. {{{ ====================================================================== ERROR: test_current_site_in_context_after_login (django.contrib.auth.tests.views.LoginTest) ---------------------------------------------------------------------- Traceback (most recent call last): File ""/sto/imp/dev/django/Django-1.1.1/django/contrib/auth/tests/views.py"", line 191, in test_current_site_in_context_after_login site = Site.objects.get_current() File ""/sto/imp/dev/django/Django-1.1.1/django/contrib/sites/models.py"", line 18, in get_current raise ImproperlyConfigured(""You're using the Django \""sites framework\"" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error."") ImproperlyConfigured: You're using the Django ""sites framework"" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error. ---------------------------------------------------------------------- }}} I realize that I can specify the individual applications in the test command to prevent this, but I think this should be fixed in the base code. The problem is in source:django/trunk/django/contrib/auth/tests/views.py@#L186 LoginTest.test_current_site_in_context_after_login where it doesn't check whether the Sites framwork is installed. {{{ #!python def test_current_site_in_context_after_login(self): response = self.client.get(reverse('django.contrib.auth.views.login')) self.assertEquals(response.status_code, 200) site = Site.objects.get_current() }}} I am attaching a diff file with my proposed fix." closed contrib.auth 1.1 duplicate farhan@… Unreviewed 1 0 0 0 0 0