Code

Ticket #10747: 10747v2.diff

File 10747v2.diff, 2.5 KB (added by Matthew Flanagan <mattimustang@…>, 5 years ago)

fix for broken diff

Line 
1Index: django/contrib/auth/tests/views.py
2===================================================================
3--- django/contrib/auth/tests/views.py  (revision 10407)
4+++ django/contrib/auth/tests/views.py  (working copy)
5@@ -205,7 +205,7 @@
6     def test_logout_default(self):
7         "Logout without next_page option renders the default template"
8         self.login()
9-        response = self.client.get('/logout/')
10+        response = self.client.get('/logout_test/')
11         self.assertEquals(200, response.status_code)
12         self.assert_('Logged out' in response.content)
13         self.confirm_logged_out()
14@@ -221,7 +221,7 @@
15     def test_logout_with_redirect_argument(self):
16         "Logout with query string redirects to specified resource"
17         self.login()
18-        response = self.client.get('/logout/?next=/login/')
19+        response = self.client.get('/logout_test/?next=/login/')
20         self.assertEqual(response.status_code, 302)
21         self.assert_(response['Location'].endswith('/login/'))
22         self.confirm_logged_out()
23@@ -232,4 +232,4 @@
24         response = self.client.get('/logout/custom_query/?follow=/somewhere/')
25         self.assertEqual(response.status_code, 302)
26         self.assert_(response['Location'].endswith('/somewhere/'))
27-        self.confirm_logged_out()
28\ No newline at end of file
29+        self.confirm_logged_out()
30Index: django/contrib/auth/tests/urls.py
31===================================================================
32--- django/contrib/auth/tests/urls.py   (revision 10407)
33+++ django/contrib/auth/tests/urls.py   (working copy)
34@@ -1,9 +1,10 @@
35-from django.conf.urls.defaults import patterns
36+from django.conf.urls.defaults import *
37 from django.contrib.auth.urls import urlpatterns
38
39 # special urls for auth test cases
40 urlpatterns += patterns('',
41     (r'^logout/custom_query/$', 'django.contrib.auth.views.logout', dict(redirect_field_name='follow')),
42     (r'^logout/next_page/$', 'django.contrib.auth.views.logout', dict(next_page='/somewhere/')),
43+    (r'^logout_test/$', 'django.contrib.auth.views.logout', dict(template_name='auth_test/logged_out.html')),
44 )
45
46Index: django/contrib/auth/tests/templates/auth_test/logged_out.html
47===================================================================
48--- django/contrib/auth/tests/templates/auth_test/logged_out.html       (revision 0)
49+++ django/contrib/auth/tests/templates/auth_test/logged_out.html       (revision 0)
50@@ -0,0 +1 @@
51+Logged out