summaryrefslogtreecommitdiff
path: root/devel/tests.py
blob: 604da74c17870f74d65cdde5e23e6e997f7cd2a9 (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
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, 200)