Test homepage is accessible
This commit is contained in:
parent
85785dddb7
commit
c16b81a618
1 changed files with 11 additions and 0 deletions
11
website/home/tests.py
Normal file
11
website/home/tests.py
Normal 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)
|
Loading…
Reference in a new issue