Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI40_Lab01_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
Ana Gabrielle S. Caligagan
CSCI40_Lab01_Willowisp
Commits
ab503b02
Commit
ab503b02
authored
Mar 07, 2020
by
Ana Gabrielle S. Caligagan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated files
parent
25b4de57
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
6 deletions
+7
-6
tests.cpython-37.pyc
heroes/__pycache__/tests.cpython-37.pyc
+0
-0
urls.cpython-37.pyc
heroes/__pycache__/urls.cpython-37.pyc
+0
-0
views.cpython-37.pyc
heroes/__pycache__/views.cpython-37.pyc
+0
-0
tests.py
heroes/tests.py
+3
-5
urls.py
heroes/urls.py
+1
-1
views.py
heroes/views.py
+3
-0
No files found.
heroes/__pycache__/tests.cpython-37.pyc
View file @
ab503b02
No preview for this file type
heroes/__pycache__/urls.cpython-37.pyc
View file @
ab503b02
No preview for this file type
heroes/__pycache__/views.cpython-37.pyc
View file @
ab503b02
No preview for this file type
heroes/tests.py
View file @
ab503b02
...
...
@@ -6,26 +6,24 @@ class HomePageTest(TestCase):
response
=
self
.
client
.
get
(
'/'
)
self
.
assertTemplateUsed
(
response
,
'home.html'
)
class
CloudTest
(
TestCase
):
def
test_uses_cloud_template
(
self
):
response
=
self
.
client
.
get
(
'/heroes/cloud/'
)
self
.
assertTemplateUsed
(
response
,
'detail_cloud.html'
)
class
JesterTest
(
TestCase
):
def
test_uses_jester_template
(
self
):
response
=
self
.
client
.
get
(
'/heroes/jester/'
)
self
.
assertTemplateUsed
(
response
,
'detail_jester.html'
)
class
SunfloweyTest
(
TestCase
):
def
test_uses_sunflowey_template
(
self
):
response
=
self
.
client
.
get
(
'/heroes/sunflowey/'
)
self
.
assertTemplateUsed
(
response
,
'detail_sunflowey.html'
)
# Create your tests here.
heroes/urls.py
View file @
ab503b02
heroes/views.py
View file @
ab503b02
...
...
@@ -8,11 +8,14 @@ from django.views.generic.detail import DetailView
class
HomeListView
(
TemplateView
):
template_name
=
"home.html"
class
CloudDetailView
(
DetailView
):
template_name
=
"detail_cloud.html"
class
JesterDetailView
(
DetailView
):
template_name
=
"detail_jester.html"
class
SunfloweyDetailView
(
DetailView
):
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