Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willowisp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Karlo Cabugwang
willowisp
Commits
57b2838f
Commit
57b2838f
authored
Mar 10, 2020
by
Karlo Cabugwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
functional_test reverted to normal and heroes page is done. need to update indiv pages
parent
abfce91b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
26 deletions
+29
-26
urls.cpython-37.pyc
heroes/__pycache__/urls.cpython-37.pyc
+0
-0
views.cpython-37.pyc
heroes/__pycache__/views.cpython-37.pyc
+0
-0
heroes.html
heroes/templates/heroes.html
+8
-3
tests.py
heroes/tests.py
+13
-14
urls.py
heroes/urls.py
+4
-5
views.py
heroes/views.py
+4
-4
No files found.
heroes/__pycache__/urls.cpython-37.pyc
View file @
57b2838f
No preview for this file type
heroes/__pycache__/views.cpython-37.pyc
View file @
57b2838f
No preview for this file type
heroes/templates/heroes.html
View file @
57b2838f
...
...
@@ -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>
...
...
heroes/tests.py
View file @
57b2838f
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
heroes/urls.py
View file @
57b2838f
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
heroes/views.py
View file @
57b2838f
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment