Commit 6eae1e7c by David Ormsbee

load mapping test

parent e3664c35
...@@ -123,6 +123,8 @@ def load_function(path): ...@@ -123,6 +123,8 @@ def load_function(path):
return getattr(import_module(module_path), name) return getattr(import_module(module_path), name)
load_function_mapping = {}
def create_modulestore_instance( def create_modulestore_instance(
engine, engine,
content_store, content_store,
...@@ -136,7 +138,11 @@ def create_modulestore_instance( ...@@ -136,7 +138,11 @@ def create_modulestore_instance(
""" """
This will return a new instance of a modulestore given an engine and options This will return a new instance of a modulestore given an engine and options
""" """
if engine in load_function_mapping:
class_ = load_function_mapping[engine]
else:
class_ = load_function(engine) class_ = load_function(engine)
load_function_mapping[engine] = class_
_options = {} _options = {}
_options.update(options) _options.update(options)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment