Add autospec to all mocks

This commit is contained in:
Ned Batchelder
2015-09-29 07:05:51 -04:00
parent 1f2f3de4a2
commit 43ac38aa87
18 changed files with 93 additions and 89 deletions

View File

@@ -387,7 +387,7 @@ class TestLibraries(LibraryTestCase):
html_block = modulestore().get_item(lc_block.children[0])
self.assertEqual(html_block.data, data2)
@patch("xmodule.library_tools.SearchEngine.get_search_engine", Mock(return_value=None))
@patch("xmodule.library_tools.SearchEngine.get_search_engine", Mock(return_value=None, autospec=True))
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"