Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
will-o-wisp
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
Santino Campos
will-o-wisp
Commits
4aa29aa9
Commit
4aa29aa9
authored
Mar 06, 2020
by
Santino Campos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write unit tests for the three hero detail pages
parent
feb74d42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests.py
heroes/tests.py
+17
-0
No files found.
heroes/tests.py
View file @
4aa29aa9
...
@@ -6,3 +6,20 @@ class HomePageTest(TestCase):
...
@@ -6,3 +6,20 @@ class HomePageTest(TestCase):
def
test_homepage_url_return_valid_template
(
self
):
def
test_homepage_url_return_valid_template
(
self
):
homepage_response
=
self
.
client
.
get
(
"/heroes"
)
homepage_response
=
self
.
client
.
get
(
"/heroes"
)
self
.
assertTemplateUsed
(
homepage_response
,
'homepage.html'
)
self
.
assertTemplateUsed
(
homepage_response
,
'homepage.html'
)
def
test_sunflowey_url_returns_valid_template
(
self
):
sunflowey_detail_response
=
self
.
client
.
get
(
"/hero/sunflowey"
)
self
.
assertTemplateUsed
(
sunflowey_detail_response
,
'detail_sunflowey.html'
)
def
test_jester_url_returns_valid_template
(
self
):
jester_detail_response
=
self
.
client
.
get
(
"/hero/jester"
)
self
.
assertTemplateUsed
(
jester_detail_response
,
'detail_jester.html'
)
def
test_cloud_url_returns_valid_template
(
self
):
cloud_detail_response
=
self
.
client
.
get
(
"/hero/cloud"
)
self
.
assertTemplateUsed
(
cloud_detail_response
,
'detail_cloud.html'
)
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