Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 40 Project 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
Dirk Reyes
CSCI 40 Project 1
Commits
2d8084f2
Commit
2d8084f2
authored
Mar 25, 2020
by
Dirk Reyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unit tests
parent
12e3c5a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
1 deletion
+59
-1
tests.py
froyo/tests.py
+59
-1
No files found.
froyo/tests.py
View file @
2d8084f2
from
django.test
import
TestCase
from
django.test
import
TestCase
# Create your tests here.
class
CheckIngredientsList
(
TestCase
):
def
check_if_ingredients_list_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/list/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_list.html"
)
class
CheckIngredientsDetail
(
TestCase
):
def
check_if_ingredients_detail_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/detail/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_detail.html"
)
class
CheckIngredientsUpdateForm
(
TestCase
):
def
check_if_ingredients_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_update_form.html"
)
class
CheckIngredientsCreateForm
(
TestCase
):
def
check_if_ingredients_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'ingredients/create_form/'
)
self
.
assertTemplateUsed
(
response
,
"ingredients_create_form.html"
)
class
CheckRecipesList
(
TestCase
):
def
check_if_recipes_list_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/list/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_list.html"
)
class
CheckRecipesDetail
(
TestCase
):
def
check_if_recipes_detail_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/detail/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_detail.html"
)
class
CheckRecipesUpdateForm
(
TestCase
):
def
check_if_recipes_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_update_form.html"
)
class
CheckRecipesCreateForm
(
TestCase
):
def
check_if_recipes_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'recipes/create_form/'
)
self
.
assertTemplateUsed
(
response
,
"recipes_create_form.html"
)
class
CheckOrdersList
(
TestCase
):
def
check_if_orders_list_views
(
self
):
response
=
self
.
client
.
get
(
'orders/list/'
)
self
.
assertTemplateUsed
(
response
,
"orders_list.html"
)
class
CheckOrdersDetail
(
TestCase
):
def
check_if_orders_detail_views
(
self
):
response
=
self
.
client
.
get
(
'orders/detail/'
)
self
.
assertTemplateUsed
(
response
,
"orders_detail.html"
)
class
CheckOrdersUpdateForm
(
TestCase
):
def
check_if_orders_update_form_views
(
self
):
response
=
self
.
client
.
get
(
'orders/update_form/'
)
self
.
assertTemplateUsed
(
response
,
"orders_update_form.html"
)
class
CheckOrdersCreateForm
(
TestCase
):
def
check_if_orders_create_form_views
(
self
):
response
=
self
.
client
.
get
(
'orders/create_form/'
)
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