Test homepage is accessible

This commit is contained in:
Jake Howard 2022-06-10 17:04:36 +01:00
parent 85785dddb7
commit c16b81a618
Signed by: jake
GPG key ID: 57AFB45680EDD477

11
website/home/tests.py Normal file
View file

@ -0,0 +1,11 @@
from django.test import TestCase
from .models import HomePage
class HomePageTestCase(TestCase):
@classmethod
def setUpTestData(cls):
cls.page = HomePage.objects.get()
def test_accessible(self):
response = self.client.get(self.page.url)
self.assertEqual(response.status_code, 200)