Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Project1-Valenzuela-185143
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
Anton Ralph Valenzuela
Project1-Valenzuela-185143
Commits
18c9f3db
Commit
18c9f3db
authored
Mar 13, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored for unit tests.
parent
aa6b1f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
tests.py
froyo/tests.py
+9
-9
No files found.
froyo/tests.py
View file @
18c9f3db
...
@@ -11,7 +11,7 @@ class HomePageTest(TestCase):
...
@@ -11,7 +11,7 @@ class HomePageTest(TestCase):
class
OrdersTest
(
TestCase
):
class
OrdersTest
(
TestCase
):
def
test_orders_use_list_template
(
self
):
def
test_orders_use_list_template
(
self
):
response
=
self
.
client
.
get
(
'/orders
/
'
)
response
=
self
.
client
.
get
(
'/orders'
)
self
.
assertTemplateUsed
(
response
,
'orders_list.html'
)
self
.
assertTemplateUsed
(
response
,
'orders_list.html'
)
def
test_orders_use_detail_template
(
self
):
def
test_orders_use_detail_template
(
self
):
...
@@ -20,17 +20,17 @@ class OrdersTest(TestCase):
...
@@ -20,17 +20,17 @@ class OrdersTest(TestCase):
def
test_orders_use_update_form_template
(
self
):
def
test_orders_use_update_form_template
(
self
):
response
=
self
.
client
.
get
(
'/orders/update_form'
)
response
=
self
.
client
.
get
(
'/orders/update_form'
)
self
.
assertTemplateUsed
(
response
,
'orders_update.html'
)
self
.
assertTemplateUsed
(
response
,
'orders_update
_form
.html'
)
def
test_orders_use_create_form_template
(
self
):
def
test_orders_use_create_form_template
(
self
):
response
=
self
.
client
.
get
(
'/orders/create_form'
)
response
=
self
.
client
.
get
(
'/orders/create_form'
)
self
.
assertTemplateUsed
(
response
,
'orders_create.html'
)
self
.
assertTemplateUsed
(
response
,
'orders_create
_form
.html'
)
class
RecipesTest
(
TestCase
):
class
RecipesTest
(
TestCase
):
def
test_recipes_use_list_template
(
self
):
def
test_recipes_use_list_template
(
self
):
response
=
self
.
client
.
get
(
'/recipes
/
'
)
response
=
self
.
client
.
get
(
'/recipes'
)
self
.
assertTemplateUsed
(
response
,
'recipes_list.html'
)
self
.
assertTemplateUsed
(
response
,
'recipes_list.html'
)
def
test_recipes_use_detail_template
(
self
):
def
test_recipes_use_detail_template
(
self
):
...
@@ -39,17 +39,17 @@ class RecipesTest(TestCase):
...
@@ -39,17 +39,17 @@ class RecipesTest(TestCase):
def
test_recipes_use_update_form_template
(
self
):
def
test_recipes_use_update_form_template
(
self
):
response
=
self
.
client
.
get
(
'/recipes/update_form'
)
response
=
self
.
client
.
get
(
'/recipes/update_form'
)
self
.
assertTemplateUsed
(
response
,
'recipes_update.html'
)
self
.
assertTemplateUsed
(
response
,
'recipes_update
_form
.html'
)
def
test_recipes_use_create_form_template
(
self
):
def
test_recipes_use_create_form_template
(
self
):
response
=
self
.
client
.
get
(
'/recipes/create_form'
)
response
=
self
.
client
.
get
(
'/recipes/create_form'
)
self
.
assertTemplateUsed
(
response
,
'recipes_create.html'
)
self
.
assertTemplateUsed
(
response
,
'recipes_create
_form
.html'
)
class
IngredientsTest
(
TestCase
):
class
IngredientsTest
(
TestCase
):
def
test_ingredients_use_list_template
(
self
):
def
test_ingredients_use_list_template
(
self
):
response
=
self
.
client
.
get
(
'/ingredients
/
'
)
response
=
self
.
client
.
get
(
'/ingredients'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_list.html'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_list.html'
)
def
test_ingredients_use_detail_template
(
self
):
def
test_ingredients_use_detail_template
(
self
):
...
@@ -58,8 +58,8 @@ class IngredientsTest(TestCase):
...
@@ -58,8 +58,8 @@ class IngredientsTest(TestCase):
def
test_ingredients_use_update_form_template
(
self
):
def
test_ingredients_use_update_form_template
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/update_form'
)
response
=
self
.
client
.
get
(
'/ingredients/update_form'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_update.html'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_update
_form
.html'
)
def
test_ingredients_use_create_form_template
(
self
):
def
test_ingredients_use_create_form_template
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/create_form'
)
response
=
self
.
client
.
get
(
'/ingredients/create_form'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_create.html'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_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