PLAT-1885 Stop using deprecated BlockUsageLocator properties

This commit is contained in:
Jeremy Bowman
2018-01-12 14:04:13 -05:00
parent c3abe79b09
commit 113e8dde61
51 changed files with 185 additions and 176 deletions

View File

@@ -299,7 +299,7 @@ class ImportRequiredTestCases(ContentStoreTestCase):
for item in items:
filesystem = OSFS(root_dir / ('test_export/' + dirname))
self.assertTrue(filesystem.exists(item.location.name + filename_suffix))
self.assertTrue(filesystem.exists(item.location.block_id + filename_suffix))
@mock.patch('xmodule.course_module.requests.get')
def test_export_course_roundtrip(self, mock_get):

View File

@@ -137,7 +137,7 @@ class CourseTestCase(ProceduralCourseTestMixin, ModuleStoreTestCase):
vertical.location = vertical.location.replace(name='no_references')
self.store.update_item(vertical, self.user.id, allow_not_found=True)
orphan_vertical = self.store.get_item(vertical.location)
self.assertEqual(orphan_vertical.location.name, 'no_references')
self.assertEqual(orphan_vertical.location.block_id, 'no_references')
self.assertEqual(len(orphan_vertical.children), len(vertical.children))
# create an orphan vertical and html; we already don't try to import