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

recipes views made

parent cb8f7183
...@@ -35,4 +35,33 @@ class IngredientsCreateTest(TestCase): ...@@ -35,4 +35,33 @@ class IngredientsCreateTest(TestCase):
def test_uses_list_template(self): def test_uses_list_template(self):
response = self.client.get('/ingredients/create') response = self.client.get('/ingredients/create')
self.assertTemplateUsed(response, 'ingredients_create_form.html') self.assertTemplateUsed(response, 'ingredients_create_form.html')
\ No newline at end of file
#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
...@@ -24,4 +24,21 @@ class IngredientsUpdate(UpdateView): ...@@ -24,4 +24,21 @@ class IngredientsUpdate(UpdateView):
class IngredientsCreate(CreateView): class IngredientsCreate(CreateView):
template_name = "Ingredients_create_form.html" template_name = "Ingredients_create_form.html"
\ No newline at end of file
#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