Commit d0919c93 by E. Kolpakov

Added docstrings

parent e59071ed
...@@ -327,6 +327,7 @@ class TestLibraries(LibraryTestCase): ...@@ -327,6 +327,7 @@ class TestLibraries(LibraryTestCase):
self.assertEqual(html_block.data, data_value) self.assertEqual(html_block.data, data_value)
def test_refreshes_children_if_libraries_change(self): def test_refreshes_children_if_libraries_change(self):
""" Tests that children are automatically refreshed if libraries list changes """
library2key = self._create_library("org2", "lib2", "Library2") library2key = self._create_library("org2", "lib2", "Library2")
library2 = modulestore().get_library(library2key) library2 = modulestore().get_library(library2key)
data1, data2 = "Hello world!", "Hello other world!" data1, data2 = "Hello world!", "Hello other world!"
...@@ -370,6 +371,7 @@ class TestLibraries(LibraryTestCase): ...@@ -370,6 +371,7 @@ class TestLibraries(LibraryTestCase):
self.assertEqual(html_block.data, data2) self.assertEqual(html_block.data, data2)
def test_refreshes_children_if_capa_type_change(self): def test_refreshes_children_if_capa_type_change(self):
""" Tests that children are automatically refreshed if capa type field changes """
name1, name2 = "Option Problem", "Multiple Choice Problem" name1, name2 = "Option Problem", "Multiple Choice Problem"
ItemFactory.create( ItemFactory.create(
category="problem", category="problem",
...@@ -420,6 +422,7 @@ class TestLibraries(LibraryTestCase): ...@@ -420,6 +422,7 @@ class TestLibraries(LibraryTestCase):
self.assertEqual(html_block.display_name, name2) self.assertEqual(html_block.display_name, name2)
def test_refresh_fails_for_unknown_library(self): def test_refresh_fails_for_unknown_library(self):
""" Tests that refresh children fails if unknown library is configured """
# Create a course: # Create a course:
with modulestore().default_store(ModuleStoreEnum.Type.split): with modulestore().default_store(ModuleStoreEnum.Type.split):
course = CourseFactory.create() course = CourseFactory.create()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment