test: remove only_xmodules
This function was only used by tests. It was breaking tests from the `xmodule` package on the devstack because the dist.key of its entry_points is `open-edx`.
This commit is contained in:
@@ -1386,10 +1386,3 @@ class ModuleStoreWriteBase(ModuleStoreReadBase, ModuleStoreWrite):
|
||||
"""
|
||||
if self.signal_handler:
|
||||
self.signal_handler.send("item_deleted", usage_key=usage_key, user_id=user_id)
|
||||
|
||||
|
||||
def only_xmodules(identifier, entry_points):
|
||||
"""Only use entry_points that are supplied by the xmodule package"""
|
||||
from_xmodule = [entry_point for entry_point in entry_points if entry_point.dist.key == 'xmodule']
|
||||
|
||||
return default_select(identifier, from_xmodule)
|
||||
|
||||
@@ -17,7 +17,6 @@ from xblock.fields import Integer, Scope, String
|
||||
from xblock.runtime import DictKeyValueStore, KvsFieldData
|
||||
|
||||
from xmodule.fields import Date
|
||||
from xmodule.modulestore import only_xmodules
|
||||
from xmodule.modulestore.inheritance import InheritanceMixin, compute_inherited_metadata
|
||||
from xmodule.modulestore.xml import ImportSystem, LibraryXMLModuleStore, XMLModuleStore
|
||||
from xmodule.tests import DATA_DIR
|
||||
@@ -69,7 +68,6 @@ class BaseCourseTestCase(TestCase):
|
||||
DATA_DIR,
|
||||
source_dirs=[name],
|
||||
xblock_mixins=(InheritanceMixin,),
|
||||
xblock_select=only_xmodules,
|
||||
)
|
||||
courses = modulestore.get_courses()
|
||||
assert len(courses) == 1
|
||||
|
||||
@@ -11,7 +11,6 @@ from fs.osfs import OSFS
|
||||
from lxml import etree
|
||||
from xblock.mixins import HierarchyMixin
|
||||
|
||||
from xmodule.modulestore import only_xmodules
|
||||
from xmodule.modulestore.inheritance import InheritanceMixin
|
||||
from xmodule.x_module import XModuleMixin
|
||||
|
||||
@@ -72,7 +71,6 @@ class XmlImportFactory(Factory):
|
||||
|
||||
filesystem = OSFS(mkdtemp())
|
||||
xblock_mixins = (InheritanceMixin, XModuleMixin, HierarchyMixin)
|
||||
xblock_select = only_xmodules
|
||||
url_name = Sequence(str)
|
||||
attribs = {}
|
||||
policy = {}
|
||||
|
||||
Reference in New Issue
Block a user