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
39b024b1
Commit
39b024b1
authored
Jul 25, 2013
by
Chris Dodge
Committed by
Brian Talbot
Jul 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix broken unit tests
parent
60f03f5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cms/djangoapps/contentstore/tests/test_contentstore.py
+3
-3
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
39b024b1
...
...
@@ -985,12 +985,12 @@ class ContentStoreTest(ModuleStoreTestCase):
def
test_create_course_check_forum_seeding
(
self
):
"""Test new course creation and verify forum seeding """
test_course_data
=
self
.
assert_created_course
(
number_suffix
=
uuid4
()
.
hex
)
self
.
assertTrue
(
are_permissions_roles_seeded
(
'MITx/{0}/
Robot_Super_Course
'
.
format
(
test_course_data
[
'number'
])))
self
.
assertTrue
(
are_permissions_roles_seeded
(
'MITx/{0}/
2013_Spring
'
.
format
(
test_course_data
[
'number'
])))
def
test_create_course_duplicate_course
(
self
):
"""Test new course creation - error path"""
self
.
client
.
post
(
reverse
(
'create_new_course'
),
self
.
course_data
)
self
.
assert_course_creation_failed
(
'There is already a course defined with th
is name
.'
)
self
.
assert_course_creation_failed
(
'There is already a course defined with th
e same organization, course number, and course run
.'
)
def
assert_course_creation_failed
(
self
,
error_message
):
"""
...
...
@@ -999,7 +999,7 @@ class ContentStoreTest(ModuleStoreTestCase):
resp
=
self
.
client
.
post
(
reverse
(
'create_new_course'
),
self
.
course_data
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
data
=
parse_json
(
resp
)
self
.
assertEqual
(
data
[
'ErrMsg'
],
'There is already a course defined with the same organization, course number, and course run.'
)
self
.
assertEqual
(
data
[
'ErrMsg'
],
error_message
)
def
test_create_course_duplicate_number
(
self
):
"""Test new course creation - error path"""
...
...
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