forked from django/djangoproject.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
38 lines (26 loc) · 966 Bytes
/
tests.py
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
from django.test import TestCase
from django_hosts.resolvers import reverse
class TemplateViewTests(TestCase):
"""
Tests for views that are instances of TemplateView.
"""
def assertView(self, name):
self.assertContains(self.client.get(reverse(name, host='www')), 'django')
def test_homepage(self):
self.assertView('homepage')
def test_overview(self):
self.assertView('overview')
def test_start(self):
self.assertView('start')
def test_code_of_conduct(self):
self.assertView('code_of_conduct')
def test_conduct_faq(self):
self.assertView('conduct_faq')
def test_conduct_reporting(self):
self.assertView('conduct_reporting')
def test_conduct_enforcement(self):
self.assertView('conduct_enforcement')
def test_conduct_changes(self):
self.assertView('conduct_changes')
def test_styleguide(self):
self.assertView('styleguide')