Ticket #12082: views.py.diff
File views.py.diff, 1.0 KB (added by , 15 years ago) |
---|
-
django/contrib/auth/tests/views.py
188 188 def test_current_site_in_context_after_login(self): 189 189 response = self.client.get(reverse('django.contrib.auth.views.login')) 190 190 self.assertEquals(response.status_code, 200) 191 site = Site.objects.get_current() 192 self.assertEquals(response.context['site'], site) 193 self.assertEquals(response.context['site_name'], site.name) 191 if Site._meta.installed: 192 site = Site.objects.get_current() 193 self.assertEquals(response.context['site'], site) 194 self.assertEquals(response.context['site_name'], site.name) 195 else: 196 self.assertEquals(response.context['site_name'], 'testserver') 194 197 self.assert_(isinstance(response.context['form'], AuthenticationForm), 195 198 'Login form is not an AuthenticationForm') 196 199