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
Ayn Collado
Midterm_Project
Commits
b2367738
Commit
b2367738
authored
Mar 18, 2020
by
Ayn Collado
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests.py, fixed urls.py for Django 3.0.3
parent
9c96f7d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
15 deletions
+59
-15
tests.py
thegoodplace/froyo/tests.py
+46
-2
urls.py
thegoodplace/froyo/urls.py
+13
-13
No files found.
thegoodplace/froyo/tests.py
View file @
b2367738
...
...
@@ -10,10 +10,54 @@ class NewVisitorTest(unittest.TestCase):
self
.
browser
.
quit
()
def
test_every_test_is_in_here
(
self
):
#
Ingredients_list te
st
self
.
browser
.
get
(
'http://localhost:8000/ingredients_list/'
)
#
test_display_ingredients_li
st
self
.
browser
.
get
(
'http://localhost:8000/
froyo/
ingredients_list/'
)
self
.
assertIn
(
'Ingredients - List'
,
self
.
browser
.
title
)
#test_display_ingredients_detail
self
.
browser
.
get
(
'http://localhost:8000/froyo/ingredients_detail/'
)
self
.
assertIn
(
'Ingredients - Detail'
,
self
.
browser
.
title
)
#test_display_ingredients_update_form
self
.
browser
.
get
(
'http://localhost:8000/froyo/ingredients_update_form/'
)
self
.
assertIn
(
'Ingredients - Update'
,
self
.
browser
.
title
)
#test_display_ingredients_create_form
self
.
browser
.
get
(
'http://localhost:8000/froyo/ingredients_create_form/'
)
self
.
assertIn
(
'Ingredients - Create'
,
self
.
browser
.
title
)
#test_display_recipes_list
self
.
browser
.
get
(
'http://localhost:8000/froyo/recipes_list/'
)
self
.
assertIn
(
'Recipes - List'
,
self
.
browser
.
title
)
#test_display_recipes_detail
self
.
browser
.
get
(
'http://localhost:8000/froyo/recipes_detail/'
)
self
.
assertIn
(
'Recipes - Detail'
,
self
.
browser
.
title
)
#test_display_recipes_update_form
self
.
browser
.
get
(
'http://localhost:8000/froyo/recipes_update_form/'
)
self
.
assertIn
(
'Recipes - Update'
,
self
.
browser
.
title
)
#test_display_recipes_create_form
self
.
browser
.
get
(
'http://localhost:8000/froyo/recipes_create_form/'
)
self
.
assertIn
(
'Recipes - Create'
,
self
.
browser
.
title
)
#test_display_orders_list
self
.
browser
.
get
(
'http://localhost:8000/froyo/orders_list/'
)
self
.
assertIn
(
'Orders - List'
,
self
.
browser
.
title
)
#test_display_orders_detail
self
.
browser
.
get
(
'http://localhost:8000/froyo/orders_detail/'
)
self
.
assertIn
(
'Orders - Detail'
,
self
.
browser
.
title
)
#test_display_orders_update_form
self
.
browser
.
get
(
'http://localhost:8000/froyo/orders_update_form/'
)
self
.
assertIn
(
'Orders - Update'
,
self
.
browser
.
title
)
#test_display_orders_list
self
.
browser
.
get
(
'http://localhost:8000/froyo/orders_create_form/'
)
self
.
assertIn
(
'Orders - Create'
,
self
.
browser
.
title
)
def
test_Fail_Test
(
self
):
self
.
fail
(
'Finished the test!'
)
...
...
thegoodplace/froyo/urls.py
View file @
b2367738
from
django.
conf.urls
import
url
from
django.
urls
import
path
from
.
import
views
urlpatterns
=
[
url
(
r'ingredients_list/'
,
views
.
ingredients_list
),
url
(
r'ingredients_detail/'
,
views
.
ingredients_detail
),
url
(
r'ingredients_update_form/'
,
views
.
ingredients_update_form
),
url
(
r'ingredients_create_form/'
,
views
.
ingredients_create_form
),
path
(
r'ingredients_list/'
,
views
.
ingredients_list
),
path
(
r'ingredients_detail/'
,
views
.
ingredients_detail
),
path
(
r'ingredients_update_form/'
,
views
.
ingredients_update_form
),
path
(
r'ingredients_create_form/'
,
views
.
ingredients_create_form
),
url
(
r'recipes_list/'
,
views
.
recipes_list
),
url
(
r'recipes_detail/'
,
views
.
recipes_detail
),
url
(
r'recipes_update_form/'
,
views
.
recipes_update_form
),
url
(
r'recipes_create_form/'
,
views
.
recipes_create_form
),
path
(
r'recipes_list/'
,
views
.
recipes_list
),
path
(
r'recipes_detail/'
,
views
.
recipes_detail
),
path
(
r'recipes_update_form/'
,
views
.
recipes_update_form
),
path
(
r'recipes_create_form/'
,
views
.
recipes_create_form
),
url
(
r'orders_list/'
,
views
.
orders_list
),
url
(
r'orders_detail/'
,
views
.
orders_detail
),
url
(
r'orders_update_form/'
,
views
.
orders_update_form
),
url
(
r'orders_create_form/'
,
views
.
orders_create_form
),
path
(
r'orders_list/'
,
views
.
orders_list
),
path
(
r'orders_detail/'
,
views
.
orders_detail
),
path
(
r'orders_update_form/'
,
views
.
orders_update_form
),
path
(
r'orders_create_form/'
,
views
.
orders_create_form
),
]
\ 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