Commit c6f1abe4 authored by Lance Michael O. Co's avatar Lance Michael O. Co 😢

recipes views made

parent cb8f7183
......@@ -36,3 +36,32 @@ class IngredientsCreateTest(TestCase):
def test_uses_list_template(self):
response = self.client.get('/ingredients/create')
self.assertTemplateUsed(response, 'ingredients_create_form.html')
#recipes test
class RecipesListTest(TestCase):
def test_uses_list_template(self):
response = self.client.get('/recipes/list')
self.assertTemplateUsed(response, 'recipes_list.html')
class RecipesDetailTest(TestCase):
def test_uses_list_template(self):
response = self.client.get('/recipes/detail')
self.assertTemplateUsed(response, 'recipes_detail.html')
class RecipesUpdateTest(TestCase):
def test_uses_list_template(self):
response = self.client.get('/recipes/update')
self.assertTemplateUsed(response, 'recipes_create_form.html')
class RecipesCreateTest(TestCase):
def test_uses_list_template(self):
response = self.client.get('/recipes/create')
self.assertTemplateUsed(response, 'recipes_create_form.html')
\ No newline at end of file
......@@ -25,3 +25,20 @@ class IngredientsUpdate(UpdateView):
class IngredientsCreate(CreateView):
template_name = "Ingredients_create_form.html"
#Recipes
class RecipesList(ListView):
template_name = "recipes_list.html"
class RecipesDetail(DetailView):
template_name = "recipes_detail.html"
class RecipesUpdate(UpdateView):
template_name = "recipes_update_form.html"
class RecipesCreate(CreateView):
template_name = "recipes_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