Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-val
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-val
Commits
ba00a5f2
Commit
ba00a5f2
authored
Dec 18, 2014
by
Christopher Lee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #35 from edx/clee/get_url_for_profile_bug
fixed get_url_for_profile
parents
8778a639
7a6d5fc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
edxval/api.py
+2
-4
edxval/tests/test_api.py
+2
-3
No files found.
edxval/api.py
View file @
ba00a5f2
...
...
@@ -220,12 +220,10 @@ def get_url_for_profile(edx_video_id, profile):
profile (str): a string of the profile we are searching
Returns:
A dict containing the profile to url. The return type is the same as
get_urls_for_profiles for consistency.
A string with the url
"""
url
=
get_urls_for_profiles
(
edx_video_id
,
[
profile
])[
profile
]
return
{
profile
:
url
}
return
get_urls_for_profiles
(
edx_video_id
,
[
profile
])[
profile
]
def
get_videos_for_course
(
course_id
):
...
...
edxval/tests/test_api.py
View file @
ba00a5f2
...
...
@@ -265,9 +265,8 @@ class GetUrlsForProfileTest(TestCase):
"""
profile
=
"mobile"
edx_video_id
=
constants
.
VIDEO_DICT_FISH
[
'edx_video_id'
]
urls
=
api
.
get_url_for_profile
(
edx_video_id
,
profile
)
self
.
assertEqual
(
len
(
urls
),
1
)
self
.
assertEqual
(
urls
[
"mobile"
],
u'http://www.meowmix.com'
)
url
=
api
.
get_url_for_profile
(
edx_video_id
,
profile
)
self
.
assertEqual
(
url
,
u'http://www.meowmix.com'
)
class
GetVideosForIds
(
TestCase
):
...
...
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