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