Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS Lab
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
Li Niko M. Arceo
CS Lab
Commits
26c216b8
Commit
26c216b8
authored
Mar 06, 2020
by
Li Niko M. Arceo
🦈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unittest for cloud details works
parent
fbfc431c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
tests.cpython-38.pyc
heroes/__pycache__/tests.cpython-38.pyc
+0
-0
tests.py
heroes/tests.py
+11
-5
No files found.
heroes/__pycache__/tests.cpython-38.pyc
View file @
26c216b8
No preview for this file type
heroes/tests.py
View file @
26c216b8
...
@@ -4,8 +4,14 @@ from django.test import TestCase
...
@@ -4,8 +4,14 @@ from django.test import TestCase
from
.views
import
HomeView
from
.views
import
HomeView
class
HomePageTest
(
TestCase
):
class
HomePageTest
(
TestCase
):
def
test_root_url_resolves_to_home_page_view
(
self
):
def
test_uses_home_template
(
self
):
def
test_uses_home_template
(
self
):
response
=
self
.
client
.
get
(
'/'
)
response
=
self
.
client
.
get
(
'/'
)
self
.
assertTemplateUsed
(
response
,
'home.html'
)
self
.
assertTemplateUsed
(
response
,
'home.html'
)
class
CloudTemplateTest
(
TestCase
):
def
test_uses_cloud_template
(
self
):
response
=
self
.
client
.
get
(
'/heroes/cloud'
)
self
.
assertTemplateUsed
(
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