16 lines
466 B
Python
16 lines
466 B
Python
from django.test import SimpleTestCase
|
|
from django.urls import reverse
|
|
|
|
|
|
class BaseTestCase(SimpleTestCase):
|
|
pass
|
|
|
|
|
|
class HomepageViewTestCase(BaseTestCase):
|
|
def test_accessible(self):
|
|
response = self.client.get(reverse("homepage"))
|
|
self.assertEqual(response.status_code, 200)
|
|
|
|
def test_contains_view_name(self):
|
|
response = self.client.get(reverse("homepage"))
|
|
self.assertContains(response, '<body class="homepageview">')
|