|
1 |
| -from django.test import TestCase |
| 1 | +def test_index(client, arches, repos, package, groups, staff_groups): |
| 2 | + response = client.get('/') |
| 3 | + assert response.status_code == 200 |
2 | 4 |
|
3 | 5 |
|
4 |
| -class PublicTest(TestCase): |
5 |
| - fixtures = ['main/fixtures/arches.json', 'main/fixtures/repos.json', |
6 |
| - 'main/fixtures/package.json', 'main/fixtures/groups.json', |
7 |
| - 'devel/fixtures/staff_groups.json'] |
| 6 | +def test_about(client, arches, repos, package, groups, staff_groups): |
| 7 | + response = client.get('/about/') |
| 8 | + assert response.status_code == 200 |
8 | 9 |
|
9 |
| - def test_index(self): |
10 |
| - response = self.client.get('/') |
11 |
| - self.assertEqual(response.status_code, 200) |
12 | 10 |
|
13 |
| - def test_about(self): |
14 |
| - response = self.client.get('/about/') |
15 |
| - self.assertEqual(response.status_code, 200) |
| 11 | +def test_art(client, arches, repos, package, groups, staff_groups): |
| 12 | + response = client.get('/art/') |
| 13 | + assert response.status_code == 200 |
16 | 14 |
|
17 |
| - def test_art(self): |
18 |
| - response = self.client.get('/art/') |
19 |
| - self.assertEqual(response.status_code, 200) |
20 | 15 |
|
21 |
| - def test_svn(self): |
22 |
| - response = self.client.get('/svn/') |
23 |
| - self.assertEqual(response.status_code, 200) |
| 16 | +def test_svn(client, arches, repos, package, groups, staff_groups): |
| 17 | + response = client.get('/svn/') |
| 18 | + assert response.status_code == 200 |
24 | 19 |
|
25 |
| - def test_donate(self): |
26 |
| - response = self.client.get('/donate/') |
27 |
| - self.assertEqual(response.status_code, 200) |
28 | 20 |
|
29 |
| - def test_download(self): |
30 |
| - response = self.client.get('/download/') |
31 |
| - self.assertEqual(response.status_code, 200) |
| 21 | +def test_donate(client, arches, repos, package, groups, staff_groups): |
| 22 | + response = client.get('/donate/') |
| 23 | + assert response.status_code == 200 |
32 | 24 |
|
33 |
| - def test_master_keys(self): |
34 |
| - response = self.client.get('/master-keys/') |
35 |
| - self.assertEqual(response.status_code, 200) |
36 | 25 |
|
37 |
| - def test_master_keys_json(self): |
38 |
| - response = self.client.get('/master-keys/json/') |
39 |
| - self.assertEqual(response.status_code, 200) |
| 26 | +def test_download(client, arches, repos, package, groups, staff_groups): |
| 27 | + response = client.get('/download/') |
| 28 | + assert response.status_code == 200 |
40 | 29 |
|
41 |
| - def test_feeds(self): |
42 |
| - response = self.client.get('/feeds/') |
43 |
| - self.assertEqual(response.status_code, 200) |
44 | 30 |
|
45 |
| - def test_people(self): |
46 |
| - response = self.client.get('/people/developers/') |
47 |
| - self.assertEqual(response.status_code, 200) |
| 31 | +def test_master_keys(client, arches, repos, package, groups, staff_groups): |
| 32 | + response = client.get('/master-keys/') |
| 33 | + assert response.status_code == 200 |
48 | 34 |
|
49 |
| - def test_sitemap(self): |
50 |
| - sitemaps = ['sitemap', 'sitemap-base'] |
51 |
| - for sitemap in sitemaps: |
52 |
| - response = self.client.get('/{}.xml'.format(sitemap)) |
53 |
| - self.assertEqual(response.status_code, 200) |
54 | 35 |
|
| 36 | +def test_master_keys_json(client, arches, repos, package, groups, staff_groups): |
| 37 | + response = client.get('/master-keys/json/') |
| 38 | + assert response.status_code == 200 |
| 39 | + |
| 40 | + |
| 41 | +def test_feeds(client, arches, repos, package, groups, staff_groups): |
| 42 | + response = client.get('/feeds/') |
| 43 | + assert response.status_code == 200 |
| 44 | + |
| 45 | + |
| 46 | +def test_people(client, arches, repos, package, groups, staff_groups): |
| 47 | + response = client.get('/people/developers/') |
| 48 | + assert response.status_code == 200 |
| 49 | + |
| 50 | + |
| 51 | +def test_sitemap(client, arches, repos, package, groups, staff_groups): |
| 52 | + sitemaps = ['sitemap', 'sitemap-base'] |
| 53 | + for sitemap in sitemaps: |
| 54 | + response = client.get('/{}.xml'.format(sitemap)) |
| 55 | + assert response.status_code == 200 |
0 commit comments