Commit 57b2838f authored by Karlo Cabugwang's avatar Karlo Cabugwang

functional_test reverted to normal and heroes page is done. need to update indiv pages

parent abfce91b
......@@ -7,9 +7,14 @@
<dt>Health Points - 600</dt>
<dt>Base Attack Damage - 57</dt>
</li>
<li><a href="/detail_cloud.html">Cloud</a></li>
<li><a href="/detail_cloud.html">Cloud</a></li>
<li><a href="/heroes/jester">Jester</a>
<dt>Health Points - 660</dt>
<dt>Base Attack Damage - 64</dt>
</li>
<li><a href="/heroes/sunflowey">Sunflowey</a>
<dt>Health Points - 650</dt>
<dt>Base Attack Damage - 43</dt>
</li>
</ul>
</body>
......
from django.urls import resolve
from django.test import TestCase
from .views import HeroesView
# , CloudView, SunfloweyView, JesterView
from .views import HeroesView, CloudView, SunfloweyView, JesterView
class HeroesPageTest(TestCase):
def test_uses_heroes_template(self):
response = self.client.get('/heroes')
self.assertTemplateUsed(response,'heroes.html')
# class CloudPageTest(TestCase):
# def test_uses_cloud_template(self):
# response = self.client.get('/heroes/cloud')
# self.assertTemplateUsed(response,'detail_cloud.html')
class CloudPageTest(TestCase):
def test_uses_cloud_template(self):
response = self.client.get('/heroes/cloud')
self.assertTemplateUsed(response,'detail_cloud.html')
# class JesterPageTest(TestCase):
# def test_uses_jester_template(self):
# response = self.client.get('/heroes/jester')
# self.assertTemplateUsed(response,'detail_jester.html')
class JesterPageTest(TestCase):
def test_uses_jester_template(self):
response = self.client.get('/heroes/jester')
self.assertTemplateUsed(response,'detail_jester.html')
# class SunfloweyPageTest(TestCase):
# def test_uses_sunflowey_template(self):
# response = self.client.get('/heroes/sunflowey')
# self.assertTemplateUsed(response,'detail_sunflowey.html')
\ No newline at end of file
class SunfloweyPageTest(TestCase):
def test_uses_sunflowey_template(self):
response = self.client.get('/heroes/sunflowey')
self.assertTemplateUsed(response,'detail_sunflowey.html')
\ No newline at end of file
from django.conf.urls import url
from .views import HeroesView, CloudView
# ,, SunfloweyView, JesterView
from .views import HeroesView, CloudView, SunfloweyView, JesterView
urlpatterns = [
url(r'^heroes$', HeroesView.as_view(), name='heroes'),
url(r'^heroes/cloud$', CloudView.as_view(), name='cloud')
# url(r'^heroes/jester$', JesterView.as_view(), name='jester'),
# url(r'^heroes/sunflowey$', SunfloweyView.as_view(), name='sunflowey'),
url(r'^heroes/cloud$', CloudView.as_view(), name='cloud'),
url(r'^heroes/jester$', JesterView.as_view(), name='jester'),
url(r'^heroes/sunflowey$', SunfloweyView.as_view(), name='sunflowey'),
]
\ No newline at end of file
......@@ -6,8 +6,8 @@ class HeroesView(TemplateView):
class CloudView(TemplateView):
template_name = "detail_cloud.html"
# class JesterView(TemplateView):
# template_name = "detail_jester.html"
class JesterView(TemplateView):
template_name = "detail_jester.html"
# class SunfloweyView(TemplateView):
# template_name = "detail_sunflowey.html"
\ No newline at end of file
class SunfloweyView(TemplateView):
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