Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm-thegoodplace
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abigail Moreno
midterm-thegoodplace
Commits
a17afee6
Commit
a17afee6
authored
Mar 18, 2020
by
abbeeeeyyyyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the tests file
parent
4030f9e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
35 deletions
+39
-35
tests.py
froyo/tests.py
+37
-33
urls.py
froyo/urls.py
+2
-2
No files found.
froyo/tests.py
View file @
a17afee6
...
...
@@ -26,50 +26,54 @@ 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'
)
response
=
self
.
client
.
get
(
'/
froyo
/'
)
self
.
assertTemplateUsed
(
response
,
'
froyo
.html'
)
def
test_ingredients_list_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/jester
/'
)
response
=
self
.
client
.
get
(
'
froyo/ingredients/list
/'
)
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_
ingredients_detail
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/ingredients/detail
/'
)
self
.
assertTemplateUsed
(
response
,
'
ingredients_detail
.html'
)
def
test_
sunflowey
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/sunflowey
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_sunflowey
.html'
)
def
test_
ingredients_update
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/ingredients/update
/'
)
self
.
assertTemplateUsed
(
response
,
'
ingredients_update_form
.html'
)
def
test_
hom
e_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/heroes
/'
)
self
.
assertTemplateUsed
(
response
,
'
heroes
.html'
)
def
test_
ingredients_creat
e_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/ingredients/create
/'
)
self
.
assertTemplateUsed
(
response
,
'
ingredients_create_form
.html'
)
def
test_
jester
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/jester
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_jester
.html'
)
def
test_
recipe_list
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/recipes/list
/'
)
self
.
assertTemplateUsed
(
response
,
'
recipe_list
.html'
)
def
test_
cloud
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/cloud
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_cloud
.html'
)
def
test_
recipe_detail
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/recipes/detail
/'
)
self
.
assertTemplateUsed
(
response
,
'
recipes_detail
.html'
)
def
test_
sunflowey
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/sunflowey
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_sunflowey
.html'
)
def
test_
recipe_update
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/recipes/update
/'
)
self
.
assertTemplateUsed
(
response
,
'
recipes_update_form
.html'
)
def
test_
home
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/heroes
/'
)
self
.
assertTemplateUsed
(
response
,
'
heroes
.html'
)
def
test_
recipe_create_form
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/recipes/create
/'
)
self
.
assertTemplateUsed
(
response
,
'
recipes_create_form
.html'
)
def
test_
jester
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/jester
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_jester
.html'
)
def
test_
orders_list
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/orders/list
/'
)
self
.
assertTemplateUsed
(
response
,
'
orders_list
.html'
)
def
test_
cloud
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
/hero/cloud
/'
)
self
.
assertTemplateUsed
(
response
,
'
detail_cloud
.html'
)
def
test_
orders_detail
_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'
froyo/orders/detail
/'
)
self
.
assertTemplateUsed
(
response
,
'
orders_detail
.html'
)
def
test_sunflowey_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'/hero/sunflowey/'
)
self
.
assertTemplateUsed
(
response
,
'detail_sunflowey.html'
)
def
test_orders_update_form_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'froyo/orders/update/'
)
self
.
assertTemplateUsed
(
response
,
'orders_update_form.html'
)
def
test_orders_create_form_page_returns_correct_html
(
self
):
response
=
self
.
client
.
get
(
'froyo/orders/create/'
)
self
.
assertTemplateUsed
(
response
,
'orders_create_form.html'
)
froyo/urls.py
View file @
a17afee6
...
...
@@ -20,8 +20,8 @@ from .views import Orders_CreateFormView
urlpatterns
=
[
path
(
''
,
HeroesView
.
as_view
(),
name
=
'
heroes
'
),
path
(
'
heroes
/'
,
HeroesView
.
as_view
(),
name
=
'heroes'
),
path
(
''
,
HeroesView
.
as_view
(),
name
=
'
froyo
'
),
path
(
'
froyo
/'
,
HeroesView
.
as_view
(),
name
=
'heroes'
),
path
(
'froyo/ingredients/list/'
,
Ingredients_ListView
.
as_view
(),
name
=
'ingredients_list'
),
path
(
'froyo/ingredients/detail/'
,
Ingredients_DetailView
.
as_view
(),
name
=
'ingredients_detail'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment