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
82c081c9
Commit
82c081c9
authored
Mar 06, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redid functional test.
parent
0667c726
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
43 deletions
+45
-43
functional_tests.py
functional_tests.py
+33
-30
tests.py
heroes/tests.py
+12
-13
No files found.
functional_tests.py
View file @
82c081c9
from
selenium
import
webdriver
import
unittest
from
selenium
import
webdriver
class
NewVisitorTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
browser
=
webdriver
.
Firefox
()
...
...
@@ -19,6 +22,7 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
self
.
assertIn
(
'http://localhost:8000/heroes'
,
self
.
browser
.
current_url
)
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
...
...
@@ -31,7 +35,7 @@ class NewVisitorTest(unittest.TestCase):
# She clicks this and she is redirected back to the wiki's homepage.
self
.
browser
.
get
(
'http://localhost:8000/heroes'
)
# She decides to do it again UwU
# She decides to do it again
self
.
browser
.
get
(
'http://localhost:8000/hero/sunflowey'
)
self
.
assertIn
(
'Detail - Sunflowey'
,
self
.
browser
.
title
)
self
.
browser
.
get
(
'http://localhost:8000/heroes'
)
...
...
@@ -40,7 +44,6 @@ class NewVisitorTest(unittest.TestCase):
self
.
assertIn
(
'Detail - Jester'
,
self
.
browser
.
title
)
self
.
browser
.
get
(
'http://localhost:8000/heroes'
)
self
.
fail
(
'Finish the test!'
)
if
__name__
==
'__main__'
:
unittest
.
main
(
warnings
=
'ignore'
)
heroes/tests.py
View file @
82c081c9
from
django.urls
import
resolve
from
django.test
import
TestCase
class
HomePageTest
(
TestCase
):
...
...
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