Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thegoodplace
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
Patrick James Ong
thegoodplace
Commits
d0d39272
Commit
d0d39272
authored
Mar 17, 2020
by
Patrick James Ong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added List, Detail, Create, and Update Page Tests for ingredients, recipes, and orders
parent
75ccd910
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
1 deletion
+86
-1
tests.py
thegoodplace/froyo/tests.py
+86
-1
No files found.
thegoodplace/froyo/tests.py
View file @
d0d39272
from
django.test
import
TestCase
# Create your tests here.
# INGREDIENTS
class
IngredientsListPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/list'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_list.html'
)
class
IngredientsDetailPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/detail'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_detail.html'
)
class
IngredientsUpdatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/update'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_update_form.html'
)
class
IngredientsCreatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/new'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_create_form.html'
)
# RECIPES
class
RecipesListPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/recipes/list'
)
self
.
assertTemplateUsed
(
response
,
'recipes_list.html'
)
class
RecipesDetailPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/recipes/detail'
)
self
.
assertTemplateUsed
(
response
,
'recipes_detail.html'
)
class
RecipesUpdatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/recipes/update'
)
self
.
assertTemplateUsed
(
response
,
'recipes_update_form.html'
)
class
RecipesCreatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/recipes/new'
)
self
.
assertTemplateUsed
(
response
,
'recipes_create_form.html'
)
# ORDERS
class
OrdersListPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders/list'
)
self
.
assertTemplateUsed
(
response
,
'orders_list.html'
)
class
OrdersDetailPageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders/detail'
)
self
.
assertTemplateUsed
(
response
,
'orders_detail.html'
)
class
OrdersUpdatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders/update'
)
self
.
assertTemplateUsed
(
response
,
'orders_update_form.html'
)
class
OrdersCreatePageTest
(
TestCase
):
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/orders/new'
)
self
.
assertTemplateUsed
(
response
,
'orders_create_form.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