From 8952eda98d0953c210eb159f24fd0ddce26cfb81 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 8 Jan 2013 13:34:22 -0500 Subject: [PATCH] XML loaded courses should no longer be able to throw NoPathToItem. The parent trees are built on a per-course basis (so it'll throw ItemNotFoundError if an item exists in a different course from the one you're asking after. NoPathToItem can still happen with MongoDB backed courseware. They store things like the info page as HTML snippets which are orphaned from other content. --- .../xmodule/modulestore/tests/test_modulestore.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py index c1d1d50a53..64816581ce 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py @@ -23,12 +23,3 @@ def check_path_to_location(modulestore): for location in not_found: assert_raises(ItemNotFoundError, path_to_location, modulestore, course_id, location) - # Since our test files are valid, there shouldn't be any - # elements with no path to them. But we can look for them in - # another course. - no_path = ( - "i4x://edX/simple/video/Lost_Video", - ) - for location in no_path: - assert_raises(NoPathToItem, path_to_location, modulestore, course_id, location) -