Commit 4aa29aa9 authored by Santino Campos's avatar Santino Campos

Write unit tests for the three hero detail pages

parent feb74d42
...@@ -6,3 +6,20 @@ class HomePageTest(TestCase): ...@@ -6,3 +6,20 @@ class HomePageTest(TestCase):
def test_homepage_url_return_valid_template(self): def test_homepage_url_return_valid_template(self):
homepage_response = self.client.get("/heroes") homepage_response = self.client.get("/heroes")
self.assertTemplateUsed(homepage_response, 'homepage.html') self.assertTemplateUsed(homepage_response, 'homepage.html')
def test_sunflowey_url_returns_valid_template(self):
sunflowey_detail_response = self.client.get("/hero/sunflowey")
self.assertTemplateUsed(sunflowey_detail_response, 'detail_sunflowey.html')
def test_jester_url_returns_valid_template(self):
jester_detail_response = self.client.get("/hero/jester")
self.assertTemplateUsed(jester_detail_response, 'detail_jester.html')
def test_cloud_url_returns_valid_template(self):
cloud_detail_response = self.client.get("/hero/cloud")
self.assertTemplateUsed(cloud_detail_response, 'detail_cloud.html')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment