Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
b669765c
Commit
b669765c
authored
Feb 23, 2016
by
Qubad786
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TNL-4136 fix topic detail endpoint's url to support alphanumeric and period characters
parent
6cc8bbff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
lms/djangoapps/teams/api_urls.py
+1
-1
lms/djangoapps/teams/tests/test_views.py
+8
-0
No files found.
lms/djangoapps/teams/api_urls.py
View file @
b669765c
...
...
@@ -14,7 +14,7 @@ from .views import (
TEAM_ID_PATTERN
=
r'(?P<team_id>[a-z\d_-]+)'
USERNAME_PATTERN
=
r'(?P<username>[\w.+-]+)'
TOPIC_ID_PATTERN
=
TEAM_ID_PATTERN
.
replace
(
'team_id'
,
'topic_id'
)
TOPIC_ID_PATTERN
=
r'(?P<topic_id>[A-Za-z\d_.-]+)'
urlpatterns
=
patterns
(
''
,
...
...
lms/djangoapps/teams/tests/test_views.py
View file @
b669765c
...
...
@@ -231,6 +231,11 @@ class TeamAPITestCase(APITestCase, SharedModuleStoreTestCase):
'name'
:
'Public Profiles'
,
'description'
:
'Description for topic 6.'
},
{
'id'
:
'Topic_6.5'
,
'name'
:
'Test Accessibility Topic'
,
'description'
:
'Description for Topic_6.5'
},
],
'max_team_size'
:
1
}
...
...
@@ -1193,6 +1198,9 @@ class TestDetailTopicAPI(TeamAPITestCase):
def
test_invalid_topic_id
(
self
):
self
.
get_topic_detail
(
'no_such_topic'
,
self
.
test_course_1
.
id
,
404
)
def
test_topic_detail_with_caps_and_dot_in_id
(
self
):
self
.
get_topic_detail
(
'Topic_6.5'
,
self
.
test_course_2
.
id
,
user
=
'student_enrolled_public_profile'
)
def
test_team_count
(
self
):
"""Test that team_count is included with a topic"""
topic
=
self
.
get_topic_detail
(
topic_id
=
'topic_0'
,
course_id
=
self
.
test_course_1
.
id
)
...
...
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