Ticket #10747: 10747.diff
File 10747.diff, 2.5 KB (added by , 16 years ago) |
---|
-
django/contrib/auth/tests/views.py
205 205 def test_logout_default(self): 206 206 "Logout without next_page option renders the default template" 207 207 self.login() 208 response = self.client.get('/logout /')208 response = self.client.get('/logout_test/') 209 209 self.assertEquals(200, response.status_code) 210 210 self.assert_('Logged out' in response.content) 211 211 self.confirm_logged_out() … … 221 221 def test_logout_with_redirect_argument(self): 222 222 "Logout with query string redirects to specified resource" 223 223 self.login() 224 response = self.client.get('/logout /?next=/login/')224 response = self.client.get('/logout_test/?next=/login/') 225 225 self.assertEqual(response.status_code, 302) 226 226 self.assert_(response['Location'].endswith('/login/')) 227 227 self.confirm_logged_out() … … 232 232 response = self.client.get('/logout/custom_query/?follow=/somewhere/') 233 233 self.assertEqual(response.status_code, 302) 234 234 self.assert_(response['Location'].endswith('/somewhere/')) 235 self.confirm_logged_out() 236 No newline at end of file 235 self.confirm_logged_out() -
django/contrib/auth/tests/urls.py
1 from django.conf.urls.defaults import patterns1 from django.conf.urls.defaults import * 2 2 from django.contrib.auth.urls import urlpatterns 3 3 4 4 # special urls for auth test cases 5 5 urlpatterns += patterns('', 6 6 (r'^logout/custom_query/$', 'django.contrib.auth.views.logout', dict(redirect_field_name='follow')), 7 7 (r'^logout/next_page/$', 'django.contrib.auth.views.logout', dict(next_page='/somewhere/')), 8 (r'^logout_test/$', 'django.contrib.auth.views.logout', dict(template_name='auth_test/logged_out.html')), 8 9 ) 9 10 -
django/contrib/auth/tests/templates/auth_test/logged_out.html
1 Logged out