Refactored for unit tests.

parent aa6b1f86
......@@ -11,7 +11,7 @@ class HomePageTest(TestCase):
class OrdersTest(TestCase):
def test_orders_use_list_template(self):
response = self.client.get('/orders/')
response = self.client.get('/orders')
self.assertTemplateUsed(response, 'orders_list.html')
def test_orders_use_detail_template(self):
......@@ -20,17 +20,17 @@ class OrdersTest(TestCase):
def test_orders_use_update_form_template(self):
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):
response = self.client.get('/orders/create_form')
self.assertTemplateUsed(response, 'orders_create.html')
self.assertTemplateUsed(response, 'orders_create_form.html')
class RecipesTest(TestCase):
def test_recipes_use_list_template(self):
response = self.client.get('/recipes/')
response = self.client.get('/recipes')
self.assertTemplateUsed(response, 'recipes_list.html')
def test_recipes_use_detail_template(self):
......@@ -39,17 +39,17 @@ class RecipesTest(TestCase):
def test_recipes_use_update_form_template(self):
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):
response = self.client.get('/recipes/create_form')
self.assertTemplateUsed(response, 'recipes_create.html')
self.assertTemplateUsed(response, 'recipes_create_form.html')
class IngredientsTest(TestCase):
def test_ingredients_use_list_template(self):
response = self.client.get('/ingredients/')
response = self.client.get('/ingredients')
self.assertTemplateUsed(response, 'ingredients_list.html')
def test_ingredients_use_detail_template(self):
......@@ -58,8 +58,8 @@ class IngredientsTest(TestCase):
def test_ingredients_use_update_form_template(self):
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):
response = self.client.get('/ingredients/create_form')
self.assertTemplateUsed(response, 'ingredients_create.html')
self.assertTemplateUsed(response, 'ingredients_create_form.html')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment