Commit a80a2440 authored by Alec Wang's avatar Alec Wang

added tests for ingredients pages

parent 7f973efb
from django.test import TestCase
# Create your tests here.
class IngredientsPagesTests(TestCase):
def test_ingredients_list_page(self):
response = self.client.get('/ingredients_list/')
self.assertContains(response, "Ingredients - List", html=True)
self.assertTemplateUsed('ingredients_list.html')
def test_ingredients_create_page(self):
response = self.client.get('/ingredients_create/')
self.assertContains(response, "Ingredients - Create", html=True)
self.assertTemplateUsed('ingredients_create_form.html')
def test_ingredients_update_page(self):
response = self.client.get('/ingredients_update/')
self.assertContains(response, "Ingredients - Update", html=True)
self.assertTemplateUsed('ingredients_update_form.html')
def test_ingredients_detail_page(self):
response = self.client.get('/ingredients_detail/')
self.assertContains(response, "Ingredients - Detail", html=True)
self.assertTemplateUsed('ingredients_detail.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