Moved templates folder inside froyo, fixed a typo in tests, urls

parent 7f311137
<!DOCTYPE html>
<html>
<head>
<title>Ingredients - Create</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Ingredients - Detail</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Ingredients - List</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Ingredients - Update</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Orders - Create</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Orders - Detail</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Orders - List</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Orders - Update</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Recipes - Create</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Recipes - Detail</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Recipes - List</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>Recipes - Update</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
from django.test import TestCase
from django.urls import resolve
from django.http import HttpRequest
from .views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView, RecipesListView, RecipesDetailView, RecipesUpdateView, RecipesCreateView, OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView
#ingredients model
......@@ -37,11 +37,11 @@ class IngredientsCreateTest(TestCase):
class RecipesListTest(TestCase):
def test_recipes_list_page_returns_correct(self):
response = self.client.get('/recipes/create')
response = self.client.get('/recipes/list')
self.assertTemplateUsed(response, 'recipes_list.html')
class RecipessDetailTest(TestCase):
class RecipesDetailTest(TestCase):
def test_recipes_detail_page_returns_correct(self):
response = self.client.get('/recipes/detail')
......
......@@ -3,18 +3,18 @@ from django.conf.urls import url
from .views import IngredientsListView, IngredientsDetailView, IngredientsUpdateView, IngredientsCreateView, RecipesListView, RecipesDetailView, RecipesUpdateView, RecipesCreateView, OrdersListView, OrdersDetailView, OrdersUpdateView, OrdersCreateView
urlpatterns = [
url(r'^ingredients/list/$', IngredientsListView.as_view(), name='ingredients_list'),
url(r'^ingredients/detail/$', IngredientsDetailView.as_view(), name='ingredients_detail'),
url(r'^ingredients/update/$', IngredientsUpdateView.as_view(), name='ingredients_update_form'),
url(r'^ingredients/create/$', IngredientsCreateView.as_view(), name='ingredients_create_form'),
url(r'^ingredients/list$', IngredientsListView.as_view(), name='ingredients_list'),
url(r'^ingredients/detail$', IngredientsDetailView.as_view(), name='ingredients_detail'),
url(r'^ingredients/update$', IngredientsUpdateView.as_view(), name='ingredients_update_form'),
url(r'^ingredients/create$', IngredientsCreateView.as_view(), name='ingredients_create_form'),
url(r'^recipes/list/$', RecipesListView.as_view(), name='recipes_list'),
url(r'^recipes/detail/$', RecipesDetailView.as_view(), name='recipes_detail'),
url(r'^recipes/update/$', RecipesUpdateView.as_view(), name='recipes_update_form'),
url(r'^recipes/create/$', RecipesCreateView.as_view(), name='recipes_create_form'),
url(r'^recipes/list$', RecipesListView.as_view(), name='recipes_list'),
url(r'^recipes/detail$', RecipesDetailView.as_view(), name='recipes_detail'),
url(r'^recipes/update$', RecipesUpdateView.as_view(), name='recipes_update_form'),
url(r'^recipes/create$', RecipesCreateView.as_view(), name='recipes_create_form'),
url(r'^orders/list/$', OrdersListView.as_view(), name='orders_list'),
url(r'^orders/detail/$', OrdersDetailView.as_view(), name='orders_detail'),
url(r'^orders/update/$', OrdersUpdateView.as_view(), name='orders_update_form'),
url(r'^orders/create/$', OrdersCreateView.as_view(), name='orders_create_form'),
url(r'^orders/list$', OrdersListView.as_view(), name='orders_list'),
url(r'^orders/detail$', OrdersDetailView.as_view(), name='orders_detail'),
url(r'^orders/update$', OrdersUpdateView.as_view(), name='orders_update_form'),
url(r'^orders/create$', OrdersCreateView.as_view(), name='orders_create_form'),
]
\ No newline at end of file
......@@ -54,7 +54,7 @@ class NewVisitorTest(unittest.TestCase):
self.browser.get('http://localhost:8000/recipes/update')
self.assertIn('Recipes - Update', self.browser.title)
def test_can_create_Recipes(self):
def test_can_create_recipes(self):
self.browser.get('http://localhost:8000/recipes/create')
self.assertIn('Recipes - Create', self.browser.title)
......@@ -88,8 +88,8 @@ class NewVisitorTest(unittest.TestCase):
#self.assertIn('', self.browser.find_element_by_id('new_size').text)
#self.assertIn('', self.browser.find_element_by_id('new_base_recipe').text)
#self.assertIn('',self.browser.find_element_by_id('new_customization').text)
self.fail('Finish the test!')
if __name__ == '__main__':
......
......@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'froyo', 'templates')],
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, '', 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......
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