Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
Lab_1
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
Ayn Collado
Lab_1
Commits
b4cd8bee
Commit
b4cd8bee
authored
Mar 09, 2020
by
Ayn Collado
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let's just make it one test ok
parent
ba13a9c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
tests.py
heroes/tests.py
+0
-9
No files found.
heroes/tests.py
View file @
b4cd8bee
...
...
@@ -18,7 +18,6 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
def
test_cloud_in_home_page
(
self
):
self
.
browser
.
get
(
'http://localhost:8000'
)
detail
=
self
.
browser
.
find_element_by_id
(
'cloud_name'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Cloud'
)
...
...
@@ -27,7 +26,6 @@ class NewVisitorTest(unittest.TestCase):
detail
=
self
.
browser
.
find_element_by_id
(
'cloud_ad'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'57'
)
def
test_sunflowey_in_home_page
(
self
):
self
.
browser
.
get
(
'http://localhost:8000'
)
detail
=
self
.
browser
.
find_element_by_id
(
'sunflowey_name'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Sunflowey'
)
...
...
@@ -36,7 +34,6 @@ class NewVisitorTest(unittest.TestCase):
detail
=
self
.
browser
.
find_element_by_id
(
'sunflowey_ad'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'43'
)
def
test_jester_in_home_page
(
self
):
self
.
browser
.
get
(
'http://localhost:8000'
)
detail
=
self
.
browser
.
find_element_by_id
(
'jester_name'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Jester'
)
...
...
@@ -45,30 +42,24 @@ class NewVisitorTest(unittest.TestCase):
detail
=
self
.
browser
.
find_element_by_id
(
'jester_ad'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'64'
)
def
test_cloud_check_title_and_heading
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/hero/cloud'
)
self
.
assertIn
(
'Detail - Cloud'
,
self
.
browser
.
title
)
detail
=
self
.
browser
.
find_element_by_id
(
'cloud_heading'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Detail - Cloud'
)
def
test_sunflowey_check_title_and_heading
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/hero/sunflowey'
)
self
.
assertIn
(
'Detail - Sunflowey'
,
self
.
browser
.
title
)
detail
=
self
.
browser
.
find_element_by_id
(
'sunflowey_heading'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Detail - Sunflowey'
)
def
test_jester_check_title_and_heading
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/hero/jester'
)
self
.
assertIn
(
'Detail - Jester'
,
self
.
browser
.
title
)
detail
=
self
.
browser
.
find_element_by_id
(
'jester_heading'
)
self
.
assertEqual
(
detail
.
get_attribute
(
'innerHTML'
),
'Detail - Jester'
)
def
check_button
(
self
):
homeButton
=
self
.
browser
.
find_element_by_id
(
'homeButton'
)
.
click
()
self
.
assertEqual
(
resolve
(
'/'
)
.
func
,
home_page
)
def
test_pass
(
self
):
self
.
fail
(
'Finish the test!'
)
if
__name__
==
'__main__'
:
...
...
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