1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
from django.test import TestCase
class DevelTest(TestCase):
def test_index(self):
response = self.client.get('/devel/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.has_header('Location'), True)
self.assertEqual(response['location'],
'http://testserver/login/?next=/devel/')
def test_notify(self):
response = self.client.get('/devel/notify/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.has_header('Location'), True)
self.assertEqual(response['location'],
'http://testserver/login/?next=/devel/notify/')
def test_profile(self):
response = self.client.get('/devel/profile/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.has_header('Location'), True)
self.assertEqual(response['location'],
'http://testserver/login/?next=/devel/profile/')
def test_newuser(self):
response = self.client.get('/devel/newuser/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.has_header('Location'), True)
self.assertEqual(response['location'],
'http://testserver/login/?next=/devel/newuser/')
def test_mirrors(self):
response = self.client.get('/mirrors/')
self.assertEqual(response.status_code, 302)
self.assertEqual(response.has_header('Location'), True)
self.assertEqual(response['location'],
'http://testserver/login/?next=/mirrors/')
|