Refactor home page view to use a template

This commit is contained in:
2024-10-23 14:03:33 -06:00
parent 5157f05996
commit 35019b3e4b
4 changed files with 7 additions and 6 deletions

View File

@@ -4,8 +4,6 @@ from lists.views import home_page
# Create your tests here.
class HomePageTest(TestCase):
def test_home_page_returns_correct_html(self):
def test_uses_home_page_template(self):
response = self.client.get("/")
self.assertContains(response, "<title>To-Do lists</title>")
self.assertContains(response, "<html>")
self.assertContains(response, "</html>")
self.assertTemplateUsed(response, "home.html")