forked from Inter-Actief/alexia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_homepage.py
35 lines (26 loc) · 874 Bytes
/
test_homepage.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
from django.test import Client
from utils.tests import TestCase
class HomepageTest(TestCase):
def setUp(self):
super(HomepageTest, self).setUp()
# Every test needs a client.
self.client = Client()
def test_homepage_empty(self):
"""
Test the homepage without data.
"""
# Issue a GET request.
response = self.client.get('/')
# Check that the response is 200 OK.
self.assertEqual(response.status_code, 200)
def test_homepage(self):
"""
Test the homepage with data.
"""
self.load_organization_data()
self.load_billing_data()
self.load_scheduling_data()
# Issue a GET request.
response = self.client.get('/')
# Check that the response is 200 OK.
self.assertEqual(response.status_code, 200)