Commit cf1c908b authored by Santino Campos's avatar Santino Campos

Write unit tests for views for ingredients model

parent ad57a1ee
from django.test import TestCase
# Create your tests here.
class IngredientViewTest(TestCase):
def test_ingredients_list_view_returns_proper_template(self):
response = self.client.get('/ingredients/list')
self.assertTemplateUsed(response, 'ingredients_list.html')
def test_ingredients_detail_view_returns_proper_template(self):
response = self.client.get('/ingredients/detail')
self.assertTemplateUsed(response, 'ingredients_detail.html')
def test_ingredients_update_form_returns_proper_template(self):
response = self.client.get('/ingredients/update')
self.assertTemplateUsed(response, 'ingredients_update_form.html')
def test_ingredients_create_form_view_returns_proper_template(self):
response = self.client.get('/ingredients/create')
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