Commit de41f439 authored by Kevin Sibug's avatar Kevin Sibug

Added unit tests for each view

parent 87af8550
from django.test import TestCase from django.test import TestCase
# Create your tests here. # Create your tests here.
class HeroesTest(TestCase):
def test_can_get_create_template(self):
response = self.client.get('/heroes/')
self.assertTemplateUsed(response, 'heroes.html')
class CloudTest(TestCase):
def test_can_get_create_template(self):
response = self.client.get('/hero/cloud/')
self.assertTemplateUsed(response, 'detail_cloud.html')
class JesterTest(TestCase):
def test_can_get_create_template(self):
response = self.client.get('/hero/jester/')
self.assertTemplateUsed(response, 'detail_jester.html')
class SunfloweyTest(TestCase):
def test_can_get_create_template(self):
response = self.client.get('/hero/sunflowey/')
self.assertTemplateUsed(response, 'detail_sunflowey.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