summaryrefslogtreecommitdiffstats
path: root/devel/tests.py
blob: da5459d64496ba43cb76e4fc0eb62f0ed4eca98e (plain)
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
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_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/')