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
558e9c8f
Commit
558e9c8f
authored
May 09, 2014
by
Diana Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3662 from edx/diana/minor-ddt-fix
Fix ddt decorators
parents
01ae09aa
f3a7be5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
common/lib/xmodule/xmodule/modulestore/tests/test_locators.py
+4
-3
No files found.
common/lib/xmodule/xmodule/modulestore/tests/test_locators.py
View file @
558e9c8f
...
...
@@ -8,9 +8,10 @@ from bson.objectid import ObjectId
from
opaque_keys
import
InvalidKeyError
from
xmodule.modulestore.locator
import
Locator
,
CourseLocator
,
BlockUsageLocator
,
DefinitionLocator
from
xmodule.modulestore.parsers
import
BRANCH_PREFIX
,
BLOCK_PREFIX
,
VERSION_PREFIX
from
ddt
import
ddt
from
ddt
import
ddt
,
data
@ddt
class
LocatorTest
(
TestCase
):
"""
Tests for subclasses of Locator.
...
...
@@ -49,7 +50,7 @@ class LocatorTest(TestCase):
self
.
assertEqual
(
str
(
testobj_2
.
version_guid
),
test_id_2_loc
)
self
.
assertEqual
(
testobj_2
.
_to_string
(),
VERSION_PREFIX
+
test_id_2_loc
)
@d
dt.d
ata
(
@data
(
' mit.eecs'
,
'mit.eecs '
,
VERSION_PREFIX
+
'mit.eecs'
,
...
...
@@ -79,7 +80,7 @@ class LocatorTest(TestCase):
with
self
.
assertRaises
(
InvalidKeyError
):
CourseLocator
.
from_string
(
'course-locator:'
+
bad_id
)
@d
dt.d
ata
(
'course-locator:'
,
'course-locator:/mit.eecs'
,
'http:mit.eecs'
,
'course-locator//mit.eecs'
)
@data
(
'course-locator:'
,
'course-locator:/mit.eecs'
,
'http:mit.eecs'
,
'course-locator//mit.eecs'
)
def
test_course_constructor_bad_url
(
self
,
bad_url
):
with
self
.
assertRaises
(
InvalidKeyError
):
CourseLocator
.
from_string
(
bad_url
)
...
...
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