Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Project1-Valenzuela-185143
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
Anton Ralph Valenzuela
Project1-Valenzuela-185143
Commits
2e5c665b
Commit
2e5c665b
authored
Mar 13, 2020
by
Anton Ralph F. Valenzuela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added URLs.
parent
c02a9d2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
urls.py
froyo/urls.py
+19
-0
functional_tests.py
functional_tests.py
+3
-3
urls.py
thegoodplace/urls.py
+1
-0
No files found.
froyo/urls.py
0 → 100644
View file @
2e5c665b
from
django.conf.urls
import
url
from
.views
import
HomeView
urlpatterns
=
[
url
(
r'^$'
,
HomeView_
.
asView
(),
name
=
'home'
),
url
(
r'^orders$'
,
OrdersListView
.
asView
(),
name
=
'orders-list'
),
url
(
r'^orders/detail$'
,
OrdersDetailsView
.
asView
(),
name
=
'orders-detail'
),
url
(
r'^orders/update$'
,
OrdersUpdateView
.
asView
(),
name
=
'orders-update'
),
url
(
r'^orders/create$'
,
OrdersCreateView
.
asView
(),
name
=
'orders-create'
),
url
(
r'^recipes$'
,
RecipesListView
.
asView
(),
name
=
'recipes-list'
),
url
(
r'^recipes/detail$'
,
RecipesDetailsView
.
asView
(),
name
=
'recipes-detail'
),
url
(
r'^recipes/update$'
,
RecipesUpdateView
.
asView
(),
name
=
'recipes-update'
),
url
(
r'^recipes/create$'
,
RecipesCreateView
.
asView
(),
name
=
'recipes-create'
),
url
(
r'^ingredients$'
,
IngredientsListView
.
asView
(),
name
=
'ingredients-list'
),
url
(
r'^ingredients/detail$'
,
IngredientsDetailsView
.
asView
(),
name
=
'ingredients-detail'
),
url
(
r'^ingredients/update$'
,
IngredientsUpdateView
.
asView
(),
name
=
'ingredients-update'
),
url
(
r'^ingredients/create$'
,
IngredientsCreateView
.
asView
(),
name
=
'ingredients-create'
),
]
functional_tests.py
View file @
2e5c665b
...
@@ -19,7 +19,7 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -19,7 +19,7 @@ class NewVisitorTest(unittest.TestCase):
def
test_can_add_orders
(
self
):
def
test_can_add_orders
(
self
):
#A customer orders a certain froyo. An employee processes the order, verifying that they are on the correct page.
#A customer orders a certain froyo. An employee processes the order, verifying that they are on the correct page.
self
.
browser
.
get
(
'http://localhost:8000/orders
/list
'
)
self
.
browser
.
get
(
'http://localhost:8000/orders'
)
self
.
assertIn
(
'Orders - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
'Orders - List'
,
self
.
browser
.
title
)
#They add the order into the list after seeing a button in the page that would allow them to do so.
#They add the order into the list after seeing a button in the page that would allow them to do so.
...
@@ -35,7 +35,7 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -35,7 +35,7 @@ class NewVisitorTest(unittest.TestCase):
def
test_can_add_recipes
(
self
):
def
test_can_add_recipes
(
self
):
#The employees came up with a new recipe, deciding to add it to the list. One of them goes to the list.
#The employees came up with a new recipe, deciding to add it to the list. One of them goes to the list.
self
.
browser
.
get
(
'http://localhost:8000/recipes
/list
'
)
self
.
browser
.
get
(
'http://localhost:8000/recipes'
)
self
.
assertIn
(
'Recipes - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
'Recipes - List'
,
self
.
browser
.
title
)
#They add the recipe into the list after seeing a button in the page that would allow them to do so.
#They add the recipe into the list after seeing a button in the page that would allow them to do so.
...
@@ -52,7 +52,7 @@ class NewVisitorTest(unittest.TestCase):
...
@@ -52,7 +52,7 @@ class NewVisitorTest(unittest.TestCase):
def
test_can_add_ingredients
(
self
):
def
test_can_add_ingredients
(
self
):
#One of the employees, a deliveryman, arrive with a package of dry ice. Wishing to keep track of the change,
#One of the employees, a deliveryman, arrive with a package of dry ice. Wishing to keep track of the change,
#They add it to the list.
#They add it to the list.
self
.
browser
.
get
(
'http://localhost:8000/ingredients
/list
'
)
self
.
browser
.
get
(
'http://localhost:8000/ingredients'
)
self
.
assertIn
(
'ingredients - List'
,
self
.
browser
.
title
)
self
.
assertIn
(
'ingredients - List'
,
self
.
browser
.
title
)
#After some looking, they find a button that would allow them to add their ingredients.
#After some looking, they find a button that would allow them to add their ingredients.
...
...
thegoodplace/urls.py
View file @
2e5c665b
...
@@ -18,4 +18,5 @@ from django.contrib import admin
...
@@ -18,4 +18,5 @@ from django.contrib import admin
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r'^admin/'
,
admin
.
site
.
urls
),
url
(
r''
,
include
(
'froyo.urls'
))
]
]
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