Modified home page template. Added more FT and UT
This commit is contained in:
@@ -6,4 +6,9 @@ from lists.views import home_page
|
||||
class HomePageTest(TestCase):
|
||||
def test_uses_home_page_template(self):
|
||||
response = self.client.get("/")
|
||||
self.assertTemplateUsed(response, "home.html")
|
||||
|
||||
def test_can_save_a_POST_request(self):
|
||||
response = self.client.post("/", data={"item_text": "A new list item"})
|
||||
self.assertContains(response, "A new list item")
|
||||
self.assertTemplateUsed(response, "home.html")
|
||||
Reference in New Issue
Block a user