Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI 40 Midterm Project
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
Lance Michael O. Co
CSCI 40 Midterm Project
Commits
c6f1abe4
Commit
c6f1abe4
authored
Mar 13, 2020
by
Lance Michael O. Co
😢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recipes views made
parent
cb8f7183
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
2 deletions
+48
-2
tests.cpython-38.pyc
froyo/__pycache__/tests.cpython-38.pyc
+0
-0
urls.cpython-38.pyc
froyo/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
froyo/__pycache__/views.cpython-38.pyc
+0
-0
tests.py
froyo/tests.py
+30
-1
views.py
froyo/views.py
+18
-1
No files found.
froyo/__pycache__/tests.cpython-38.pyc
View file @
c6f1abe4
No preview for this file type
froyo/__pycache__/urls.cpython-38.pyc
View file @
c6f1abe4
No preview for this file type
froyo/__pycache__/views.cpython-38.pyc
View file @
c6f1abe4
No preview for this file type
froyo/tests.py
View file @
c6f1abe4
...
...
@@ -35,4 +35,33 @@ class IngredientsCreateTest(TestCase):
def
test_uses_list_template
(
self
):
response
=
self
.
client
.
get
(
'/ingredients/create'
)
self
.
assertTemplateUsed
(
response
,
'ingredients_create_form.html'
)
\ No newline at end of file
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
froyo/views.py
View file @
c6f1abe4
...
...
@@ -24,4 +24,21 @@ class IngredientsUpdate(UpdateView):
class
IngredientsCreate
(
CreateView
):
template_name
=
"Ingredients_create_form.html"
\ No newline at end of file
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
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