Merge pull request #9287 from edx/release

Release
This commit is contained in:
Peter Fogg
2015-08-12 13:06:39 -04:00
26 changed files with 250 additions and 1280 deletions

View File

@@ -1903,8 +1903,8 @@ class RerunCourseTest(ContentStoreTestCase):
source_course = CourseFactory.create(advertised_start="01-12-2015")
destination_course_key = self.post_rerun_request(source_course.id)
destination_course = self.store.get_course(destination_course_key)
# Advertised_start is String field so it will return empty string if its not set
self.assertEqual('', destination_course.advertised_start)
self.assertEqual(None, destination_course.advertised_start)
def test_rerun_of_rerun(self):
source_course = CourseFactory.create()

View File

@@ -787,7 +787,7 @@ def _rerun_course(request, org, number, run, fields):
CourseRerunState.objects.initiated(source_course_key, destination_course_key, request.user, fields['display_name'])
# Clear the fields that must be reset for the rerun
fields['advertised_start'] = ''
fields['advertised_start'] = None
# Rerun the course as a new celery task
json_fields = json.dumps(fields, cls=EdxJSONEncoder)

View File

@@ -451,41 +451,6 @@ class ExportTestCase(CourseTestCase):
finally:
shutil.rmtree(root_dir / name)
def test_library_import_then_export(self):
"""
Verify that a library exports successfully after being imported.
"""
library = LibraryFactory.create(modulestore=self.store)
lib_key = library.location.library_key
name = library.url_name
# import the library
extract_dir = path(tempfile.mkdtemp(dir=settings.DATA_DIR))
extract_dir_relative = path.relpath(extract_dir, settings.DATA_DIR)
try:
with tarfile.open(path(TEST_DATA_DIR) / 'imports' / 'library.HhJfPD.tar.gz') as tar:
safetar_extractall(tar, extract_dir)
library_items = import_library_from_xml(
self.store,
self.user.id,
settings.GITHUB_REPO_ROOT,
[extract_dir_relative / 'library'],
load_error_modules=False,
static_content_store=contentstore(),
target_id=lib_key
)
# verify library import correctly
self.assertEqual(lib_key, library_items[0].location.library_key)
library = self.store.get_library(lib_key)
self.assertEqual(len(library.children), 3)
# export library again
export_library_to_xml(self.store, contentstore(), lib_key, extract_dir, name)
finally:
shutil.rmtree(extract_dir)
def test_export_success_with_custom_tag(self):
"""
Verify that course export with customtag

View File

@@ -625,7 +625,7 @@ class TestEditItem(TestEditItemSetup):
data={'nullout': ['markdown']}
)
problem = self.get_item_from_modulestore(self.problem_usage_key, verify_is_draft=True)
self.assertEqual(problem.markdown, '')
self.assertIsNone(problem.markdown)
def test_date_fields(self):
"""