diff options
Diffstat (limited to 'devel/tests.py')
-rw-r--r-- | devel/tests.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/devel/tests.py b/devel/tests.py new file mode 100644 index 00000000..682f3d92 --- /dev/null +++ b/devel/tests.py @@ -0,0 +1,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/') |