'Tests that refresh children fails if unknown library is configured'

def test_refresh_fails_for_unknown_library(self):

    with modulestore().default_store(ModuleStoreEnum.Type.split):
        course = CourseFactory.create()
    lc_block = self._add_library_content_block(course, self.lib_key)
    lc_block = self._refresh_children(lc_block)
    self.assertEqual(len(lc_block.children), 0)
    resp = self._update_item(lc_block.location, {'source_library_id': 'library-v1:NOT+FOUND'})
    self.assertEqual(resp.status_code, 200)
    with self.assertRaises(ValueError):
        self._refresh_children(lc_block, status_code_expected=400)
