Commit 4030f9e9 authored by abbeeeeyyyyy's avatar abbeeeeyyyyy

Updated the froyo urls

parent 155b0a7e
from django.test import TestCase
from django.urls import resolve
from django.http import HttpRequest
from .views import Ingredients_ListView
from .views import Ingredients_DetailView
from .views import Ingredients_UpdateFormView
from .views import Ingredients_CreateFormView
from .views import Recipes_ListView
from .views import Recipes_DetailView
from .views import Recipes_UpdateFormView
from .views import Recipes_CreateFormView
from .views import Orders_ListView
from .views import Orders_DetailView
from .views import Orders_UpdateFormView
from .views import Orders_CreateFormView
from django.template.loader import render_to_string
# Create your tests here.
class TheGoodPlaceSiteTest(TestCase):
def test_home_page_returns_correct_html(self):
response = self.client.get('/heroes/')
self.assertTemplateUsed(response, 'heroes.html')
def test_ingredients_list_page_returns_correct_html(self):
response = self.client.get('/hero/jester/')
self.assertTemplateUsed(response,'ingredients_list.html')
def test_cloud_page_returns_correct_html(self):
response = self.client.get('/hero/cloud/')
self.assertTemplateUsed(response, 'detail_cloud.html')
def test_sunflowey_page_returns_correct_html(self):
response = self.client.get('/hero/sunflowey/')
self.assertTemplateUsed(response, 'detail_sunflowey.html')
def test_home_page_returns_correct_html(self):
response = self.client.get('/heroes/')
self.assertTemplateUsed(response, 'heroes.html')
def test_jester_page_returns_correct_html(self):
response = self.client.get('/hero/jester/')
self.assertTemplateUsed(response,'detail_jester.html')
def test_cloud_page_returns_correct_html(self):
response = self.client.get('/hero/cloud/')
self.assertTemplateUsed(response, 'detail_cloud.html')
def test_sunflowey_page_returns_correct_html(self):
response = self.client.get('/hero/sunflowey/')
self.assertTemplateUsed(response, 'detail_sunflowey.html')
def test_home_page_returns_correct_html(self):
response = self.client.get('/heroes/')
self.assertTemplateUsed(response, 'heroes.html')
def test_jester_page_returns_correct_html(self):
response = self.client.get('/hero/jester/')
self.assertTemplateUsed(response,'detail_jester.html')
def test_cloud_page_returns_correct_html(self):
response = self.client.get('/hero/cloud/')
self.assertTemplateUsed(response, 'detail_cloud.html')
def test_sunflowey_page_returns_correct_html(self):
response = self.client.get('/hero/sunflowey/')
self.assertTemplateUsed(response, 'detail_sunflowey.html')
......@@ -23,18 +23,18 @@ urlpatterns = [
path('', HeroesView.as_view(), name='heroes'),
path('heroes/', HeroesView.as_view(), name='heroes'),
path('TheGoodPlace/Ingredients/List/', Ingredients_ListView.as_view(), name='ingredients_list'),
path('TheGoodPlace/Ingredients/Detail/', Ingredients_DetailView.as_view(), name='ingredients_detail'),
path('TheGoodPlace/Ingredients/UpdateForm/', Ingredients_UpdateFormView.as_view(), name='ingredients_update_form'),
path('TheGoodPlace/Ingredients/CreateForm/', Ingredients_CreateFormView.as_view(), name='ingredients_create_form'),
path('TheGoodPlace/Recipes/List/', Recipes_ListView.as_view(), name='recipes_list'),
path('TheGoodPlace/Recipes/Detail/', Recipes_DetailView.as_view(), name='recipes_detail'),
path('TheGoodPlace/Recipes/UpdateForm/', Recipes_UpdateFormView.as_view(), name='recipes_update_form'),
path('TheGoodPlace/Recipes/CreateForm/', Recipes_CreateFormView.as_view(), name='recipes_create_form'),
path('TheGoodPlace/Orders/List/', JesterView.as_view(), name='orders_list'),
path('TheGoodPlace/Orders/Detail/', SunfloweyView.as_view(), name='orders_detail'),
path('TheGoodPlace/Orders/UpdateForm/', CloudView.as_view(), name='orders_update_form'),
path('TheGoodPlace/Orders/CreateForm/', HeroesView.as_view(), name='orders_create_form'),
path('froyo/ingredients/list/', Ingredients_ListView.as_view(), name='ingredients_list'),
path('froyo/ingredients/detail/', Ingredients_DetailView.as_view(), name='ingredients_detail'),
path('froyo/ingredients/update/', Ingredients_UpdateFormView.as_view(), name='ingredients_update_form'),
path('froyo/ingredients/create/', Ingredients_CreateFormView.as_view(), name='ingredients_create_form'),
path('froyo/recipes/list/', Recipes_ListView.as_view(), name='recipes_list'),
path('froyo/recipes/detail/', Recipes_DetailView.as_view(), name='recipes_detail'),
path('froyo/recipes/update/', Recipes_UpdateFormView.as_view(), name='recipes_update_form'),
path('froyo/recipes/create/', Recipes_CreateFormView.as_view(), name='recipes_create_form'),
path('froyo/orders/list/', Orders_ListView.as_view(), name='orders_list'),
path('froyo/orders/detail/', Orders_DetailView.as_view(), name='orders_detail'),
path('froyo/orders/update/', Orders_UpdateFormView.as_view(), name='orders_update_form'),
path('froyo/orders/create/', Orders_CreateFormView.as_view(), name='orders_create_form'),
]
\ 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