summaryrefslogtreecommitdiffstats
path: root/public/tests.py
blob: b826ee53d01a18ac03504966eaaeaf5245ee1a2b (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from django.test import TestCase


class PublicTest(TestCase):
    fixtures = ['main/fixtures/arches.json', 'main/fixtures/repos.json',
                'main/fixtures/package.json', 'main/fixtures/groups.json',
                'devel/fixtures/staff_groups.json']

    def test_index(self):
        response = self.client.get('/')
        self.assertEqual(response.status_code, 200)

    def test_about(self):
        response = self.client.get('/about/')
        self.assertEqual(response.status_code, 200)

    def test_art(self):
        response = self.client.get('/art/')
        self.assertEqual(response.status_code, 200)

    def test_svn(self):
        response = self.client.get('/svn/')
        self.assertEqual(response.status_code, 200)

    def test_donate(self):
        response = self.client.get('/donate/')
        self.assertEqual(response.status_code, 200)

    def test_download(self):
        response = self.client.get('/download/')
        self.assertEqual(response.status_code, 200)

    def test_master_keys(self):
        response = self.client.get('/master-keys/')
        self.assertEqual(response.status_code, 200)

    def test_master_keys_json(self):
        response = self.client.get('/master-keys/json/')
        self.assertEqual(response.status_code, 200)

    def test_feeds(self):
        response = self.client.get('/feeds/')
        self.assertEqual(response.status_code, 200)

    def test_people(self):
        response = self.client.get('/people/developers/')
        self.assertEqual(response.status_code, 200)

    def test_sitemap(self):
        sitemaps = ['sitemap', 'sitemap-base']
        for sitemap in sitemaps:
            response = self.client.get('/{}.xml'.format(sitemap))
            self.assertEqual(response.status_code, 200)