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
bbf2398b
Commit
bbf2398b
authored
Jun 24, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test_course_settings to not rely on full course
parent
456daa9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
cms/djangoapps/contentstore/tests/test_course_settings.py
+4
-6
No files found.
cms/djangoapps/contentstore/tests/test_course_settings.py
View file @
bbf2398b
...
...
@@ -295,12 +295,10 @@ class CourseMetadataEditingTest(CourseTestCase):
"""
Tests for CourseMetadata.
"""
#FIX
def
setUp
(
self
):
CourseTestCase
.
setUp
(
self
)
# add in the full class too
import_from_xml
(
get_modulestore
(
self
.
course
.
location
),
'common/test/data/'
,
[
'full'
])
self
.
fullcourse_location
=
Location
([
'i4x'
,
'edX'
,
'full'
,
'course'
,
'6.002_Spring_2012'
,
None
])
CourseFactory
.
create
(
org
=
'edX'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
self
.
fullcourse_location
=
Location
([
'i4x'
,
'edX'
,
'999'
,
'course'
,
'Robot_Super_Course'
,
None
])
def
test_fetch_initial_fields
(
self
):
test_model
=
CourseMetadata
.
fetch
(
self
.
course
.
location
)
...
...
@@ -310,7 +308,7 @@ class CourseMetadataEditingTest(CourseTestCase):
test_model
=
CourseMetadata
.
fetch
(
self
.
fullcourse_location
)
self
.
assertNotIn
(
'graceperiod'
,
test_model
,
'blacklisted field leaked in'
)
self
.
assertIn
(
'display_name'
,
test_model
,
'full missing editable metadata field'
)
self
.
assertEqual
(
test_model
[
'display_name'
],
'
Testing
'
,
"not expected value"
)
self
.
assertEqual
(
test_model
[
'display_name'
],
'
Robot Super Course
'
,
"not expected value"
)
self
.
assertIn
(
'rerandomize'
,
test_model
,
'Missing rerandomize metadata field'
)
self
.
assertIn
(
'showanswer'
,
test_model
,
'showanswer field '
)
self
.
assertIn
(
'xqa_key'
,
test_model
,
'xqa_key field '
)
...
...
@@ -350,7 +348,7 @@ class CourseMetadataEditingTest(CourseTestCase):
# ensure no harm
self
.
assertNotIn
(
'graceperiod'
,
test_model
,
'blacklisted field leaked in'
)
self
.
assertIn
(
'display_name'
,
test_model
,
'full missing editable metadata field'
)
self
.
assertEqual
(
test_model
[
'display_name'
],
'
Testing
'
,
"not expected value"
)
self
.
assertEqual
(
test_model
[
'display_name'
],
'
Robot Super Course
'
,
"not expected value"
)
self
.
assertIn
(
'rerandomize'
,
test_model
,
'Missing rerandomize metadata field'
)
# check for deletion effectiveness
self
.
assertEqual
(
'closed'
,
test_model
[
'showanswer'
],
'showanswer field still in'
)
...
...
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