Updated files

parent 25b4de57
...@@ -6,26 +6,24 @@ class HomePageTest(TestCase): ...@@ -6,26 +6,24 @@ class HomePageTest(TestCase):
response = self.client.get('/') response = self.client.get('/')
self.assertTemplateUsed(response, 'home.html') self.assertTemplateUsed(response, 'home.html')
class CloudTest(TestCase): class CloudTest(TestCase):
def test_uses_cloud_template(self): def test_uses_cloud_template(self):
response = self.client.get('/heroes/cloud/') response = self.client.get('/heroes/cloud/')
self.assertTemplateUsed(response, 'detail_cloud.html') self.assertTemplateUsed(response, 'detail_cloud.html')
class JesterTest(TestCase): class JesterTest(TestCase):
def test_uses_jester_template(self): def test_uses_jester_template(self):
response = self.client.get('/heroes/jester/') response = self.client.get('/heroes/jester/')
self.assertTemplateUsed(response, 'detail_jester.html') self.assertTemplateUsed(response, 'detail_jester.html')
class SunfloweyTest(TestCase): class SunfloweyTest(TestCase):
def test_uses_sunflowey_template(self): def test_uses_sunflowey_template(self):
response = self.client.get('/heroes/sunflowey/') response = self.client.get('/heroes/sunflowey/')
self.assertTemplateUsed(response, 'detail_sunflowey.html') self.assertTemplateUsed(response, 'detail_sunflowey.html')
# Create your tests here.
...@@ -8,11 +8,14 @@ from django.views.generic.detail import DetailView ...@@ -8,11 +8,14 @@ from django.views.generic.detail import DetailView
class HomeListView(TemplateView): class HomeListView(TemplateView):
template_name = "home.html" template_name = "home.html"
class CloudDetailView(DetailView): class CloudDetailView(DetailView):
template_name = "detail_cloud.html" template_name = "detail_cloud.html"
class JesterDetailView(DetailView): class JesterDetailView(DetailView):
template_name = "detail_jester.html" template_name = "detail_jester.html"
class SunfloweyDetailView(DetailView): class SunfloweyDetailView(DetailView):
template_name = "detail_sunflowey.html" template_name = "detail_sunflowey.html"
\ No newline at end of file
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