Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willowisp_valenzuela
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
Anton Ralph Valenzuela
willowisp_valenzuela
Commits
3a3d17bd
Commit
3a3d17bd
authored
Mar 06, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started on heroes unit test and added URLs.
parent
8fb1fd91
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
heroes.html
heroes/templates/heroes.html
+6
-0
tests.py
heroes/tests.py
+8
-1
urls.py
heroes/urls.py
+10
-0
views.py
heroes/views.py
+2
-1
No files found.
heroes/templates/heroes.html
0 → 100644
View file @
3a3d17bd
<!DOCTYPE html>
<html>
<head>
<title>
The Will of the Wisps Wiki
</title>
</head>
</html>
\ No newline at end of file
heroes/tests.py
View file @
3a3d17bd
from
django.urls
import
resolve
from
django.test
import
TestCase
# Create your tests here.
class
HomePageTest
(
TestCase
):
def
test_heroes_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/'
)
html
=
response
.
content
.
decode
(
'utf8'
)
self
.
assertTemplateUsed
(
response
,
'heroes.html'
)
heroes/urls.py
0 → 100644
View file @
3a3d17bd
from
django.conf.urls
import
url
from
.views
import
heroes_page
urlpatterns
=
[
url
(
r'^heroes/$'
,
heroes_page
,
name
=
'heroes_page'
),
url
(
r'^hero/cloud$'
,
cloud_page
,
name
=
'cloud_page'
),
url
(
r'^hero/sunflowey$'
,
sunflowey_page
,
name
=
'sunflowey_page'
),
url
(
r'^hero/jester$'
,
jester_page
,
name
=
'jester_page'
),
]
heroes/views.py
View file @
3a3d17bd
from
django.shortcuts
import
render
# Create your views here.
def
heroes_page
(
request
):
return
render
(
request
,
'heroes.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