Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lab-1-wang-alec-185292-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
Alec
lab-1-wang-alec-185292-willowisp
Commits
99031989
Commit
99031989
authored
Mar 07, 2020
by
Alec Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more unit tests
parent
1c568094
Pipeline
#905
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
tests.cpython-38.pyc
heroes/__pycache__/tests.cpython-38.pyc
+0
-0
tests.py
heroes/tests.py
+28
-2
No files found.
heroes/__pycache__/tests.cpython-38.pyc
View file @
99031989
No preview for this file type
heroes/tests.py
View file @
99031989
...
@@ -5,7 +5,33 @@ from django.test import TestCase
...
@@ -5,7 +5,33 @@ from django.test import TestCase
from
.views
import
*
from
.views
import
*
from
django.test
import
TestCase
class
HomePageTest
(
TestCase
):
class
HomePageTest
(
TestCase
):
def
test_uses_heroes_template
(
self
):
def
test_home_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/'
)
response
=
self
.
client
.
get
(
'/'
)
self
.
assertTemplateUser
(
response
,
'heroes.html'
)
self
.
assertTemplateUsed
(
response
,
'heroes.html'
)
class
HeroesPageTest
(
TestCase
):
def
test_heroes_page
(
self
):
response
=
self
.
client
.
get
(
'/heroes'
)
self
.
assertTemplateUsed
(
response
,
'heroes.html'
)
class
HeroPagesTest
(
TestCase
):
def
test_cloud_page
(
self
):
response
=
self
.
client
.
get
(
'/hero/cloud'
)
self
.
assertTemplateUsed
(
response
,
'detail_cloud.html'
)
def
test_jester_page
(
self
):
response
=
self
.
client
.
get
(
'/hero/jester'
)
self
.
assertTemplateUsed
(
response
,
'detail_jester.html'
)
def
test_cloud_page
(
self
):
response
=
self
.
client
.
get
(
'/hero/sunflowey'
)
self
.
assertTemplateUsed
(
response
,
'detail_sunflowey.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