Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
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
edx
django-rest-framework
Commits
f0227430
Commit
f0227430
authored
Jun 16, 2013
by
Alex Burgel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename router collection test case
parent
8d521c06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
rest_framework/tests/test_routers.py
+3
-3
No files found.
rest_framework/tests/test_routers.py
View file @
f0227430
...
...
@@ -216,7 +216,7 @@ class TestActionAppliedToExistingRoute(TestCase):
self
.
router
.
urls
class
Static
AndDynamicViewSet
(
viewsets
.
ViewSet
):
class
Collection
AndDynamicViewSet
(
viewsets
.
ViewSet
):
def
list
(
self
,
request
,
*
args
,
**
kwargs
):
return
Response
({
'method'
:
'list'
})
...
...
@@ -237,12 +237,12 @@ class StaticAndDynamicViewSet(viewsets.ViewSet):
return
Response
({
'method'
:
'link2'
})
class
Test
Static
AndDynamicRouter
(
TestCase
):
class
Test
Collection
AndDynamicRouter
(
TestCase
):
def
setUp
(
self
):
self
.
router
=
SimpleRouter
()
def
test_link_and_action_decorator
(
self
):
routes
=
self
.
router
.
get_routes
(
Static
AndDynamicViewSet
)
routes
=
self
.
router
.
get_routes
(
Collection
AndDynamicViewSet
)
decorator_routes
=
[
r
for
r
in
routes
if
not
(
r
.
name
.
endswith
(
'-list'
)
or
r
.
name
.
endswith
(
'-detail'
))]
# Make sure all these endpoints exist and none have been clobbered
for
i
,
endpoint
in
enumerate
([
'collection_action'
,
'collection_link'
,
'dynamic_action'
,
'dynamic_link'
]):
...
...
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