Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Midterm-Project
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
Kyra Hung
Midterm-Project
Commits
f50f7787
Commit
f50f7787
authored
Mar 16, 2020
by
KY-2187
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update functional_test.py
parent
58c8c5ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
1 deletion
+87
-1
functional_test.py
Midterm Project/functional_test.py
+87
-1
No files found.
Midterm Project/functional_test.py
View file @
f50f7787
...
...
@@ -10,7 +10,93 @@ class NewVisitorTest(unittest.TestCase):
def
tearDown
(
self
):
self
.
browser
.
quit
()
def
somethingsomething
(
self
):
def
test_displays_ingredients_list
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/ingredients_list'
)
self
.
assertIn
(
'Ingredients - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/ingredients_list'
)
def
test_displays_ingredients_detail
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/ingredients_detail'
)
self
.
assertIn
(
'Ingredients - Detail'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/ingredients_detail'
)
def
test_displays_ingredients_update
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/ingredients_update'
)
self
.
assertIn
(
'Ingredients - Update'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/ingredients_update'
)
def
test_displays_ingredients_create
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/ingredients_create'
)
self
.
assertIn
(
'Ingredients - Detail'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/ingredients_create'
)
def
test_displays_recipes_list
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes_list'
)
self
.
assertIn
(
'Recipes - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/recipes_list'
)
def
test_displays_recipes_detail
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes_detail'
)
self
.
assertIn
(
'Recipes - Detail'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/recipes_detail'
)
def
test_displays_recipes_update
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes_update'
)
self
.
assertIn
(
'Recipes - Update'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/recipes_update'
)
def
test_displays_recipes_create
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/recipes_create'
)
self
.
assertIn
(
'Recipes - Create'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/recipes_create'
)
def
test_displays_orders_list
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/orders_list'
)
self
.
assertIn
(
'Orders - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/orders_list'
)
def
test_displays_orders_detail
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/orders_detail'
)
self
.
assertIn
(
'Orders - Detail'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/orders_detail'
)
def
test_displays_orders_update
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/orders_update'
)
self
.
assertIn
(
'Orders - Update'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/orders_update'
)
def
test_displays_orders_create
(
self
):
self
.
browser
.
get
(
'http://localhost:8000/orders_create'
)
self
.
assertIn
(
'Orders - Create'
,
self
.
browser
.
title
)
self
.
assertIn
(
self
.
browser
.
current_url
,
'https://localhost:8000/orders_create'
)
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