Commit 6d5b5fd7 authored by Alex Bernard Francia's avatar Alex Bernard Francia

Added remaining unit tests. 8 out of 12 failures, due to only 4 out of 12...

Added remaining unit tests. 8 out of 12 failures, due to only 4 out of 12 templates (ingredients) added so far.
parent 28663468
...@@ -9,8 +9,6 @@ from django.test import TestCase ...@@ -9,8 +9,6 @@ from django.test import TestCase
class HomePageTest(TestCase): class HomePageTest(TestCase):
def test_home_page_returns_correct_html(self): def test_home_page_returns_correct_html(self):
response = self.client.get('/') response = self.client.get('/')
...@@ -24,3 +22,72 @@ class HomePageTest(TestCase): ...@@ -24,3 +22,72 @@ class HomePageTest(TestCase):
# self.assertEqual(html, expected_html) # self.assertEqual(html, expected_html)
self.assertTemplateUsed(response, 'home_page.html') self.assertTemplateUsed(response, 'home_page.html')
class IngredientsDetailTest(TestCase):
def test_ingredients_detail_page_returns_correct_html(self):
response = self.client.get('/ingredients/detail')
self.assertTemplateUsed(response, 'ingredients_detail.html')
class IngredientsUpdateTest(TestCase):
def test_ingredients_update_page_returns_correct_html(self):
response = self.client.get('/ingredients/update')
self.assertTemplateUsed(response, 'ingredients_update_form.html')
class IngredientsCreateTest(TestCase):
def test_ingredients_create_page_returns_correct_html(self):
response = self.client.get('/ingredients/create')
self.assertTemplateUsed(response, 'ingredients_create_form.html')
class RecipesListTest(TestCase):
def test_recipes_list_page_returns_correct_html(self):
response = self.client.get('/recipes/list')
self.assertTemplateUsed(response, 'recipes_list.html')
class RecipesDetailTest(TestCase):
def test_recipes_detail_page_returns_correct_html(self):
response = self.client.get('/recipes/detail')
self.assertTemplateUsed(response, 'recipes_detail.html')
class RecipesUpdateTest(TestCase):
def test_recipes_update_page_returns_correct_html(self):
response = self.client.get('/recipes/update')
self.assertTemplateUsed(response, 'recipes_update_form.html')
class RecipesCreateTest(TestCase):
def test_recipes_create_page_returns_correct_html(self):
response = self.client.get('/recipes/create')
self.assertTemplateUsed(response, 'recipes_create_form.html')
class OrdersListTest(TestCase):
def test_orders_list_page_returns_correct_html(self):
response = self.client.get('/orders/list')
self.assertTemplateUsed(response, 'orders_list.html')
class OrdersDetailTest(TestCase):
def test_orders_detail_page_returns_correct_html(self):
response = self.client.get('/orders/detail')
self.assertTemplateUsed(response, 'orders_detail.html')
class OrdersUpdateTest(TestCase):
def test_orders_update_page_returns_correct_html(self):
response = self.client.get('/orders/update')
self.assertTemplateUsed(response, 'orders_update_form.html')
class OrdersCreateTest(TestCase):
def test_orders_create_page_returns_correct_html(self):
response = self.client.get('/orders/create')
self.assertTemplateUsed(response, 'orders_create_form.html')
\ No newline at end of file
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