Refactored some of the classes in tests.py to not unnecessarily depend on the XML modulestore.

Conflicts:
	lms/djangoapps/courseware/tests/test_navigation.py
	lms/djangoapps/courseware/tests/test_view_authentication.py
	lms/djangoapps/courseware/tests/tests.py
This commit is contained in:
Jean Manuel Nater
2013-06-18 11:53:43 -04:00
parent 78128e7672
commit 97275a3286
5 changed files with 17 additions and 470 deletions

View File

@@ -1,12 +1,13 @@
from factory import Factory, lazy_attribute_sequence, lazy_attribute
from uuid import uuid4
import datetime
from xmodule.modulestore import Location
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.inheritance import own_metadata
from xmodule.x_module import ModuleSystem
from mitxmako.shortcuts import render_to_string
from xblock.runtime import InvalidScopeError
import datetime
from pytz import UTC
@@ -149,6 +150,8 @@ class XModuleItemFactory(Factory):
if new_item.location.category not in DETACHED_CATEGORIES:
store.update_children(parent_location, parent.children + [new_item.location.url()])
new_item = store.get_item(new_item.location)
return new_item