cribbed from https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/modulestore/tests/factories.py#L31
but it seems like just setting to modulestore() work fine, so will go with that.