Add tests for clone_course

PLAT-142

@cpennington @doctoryes plz review
Ah - my assumption was that we simply *never* wanted anyone to do it - not
that it just wasn't implemented yet. Since that's the case, I'd say it
wasn't necessary.

On Tue, Oct 28, 2014 at 1:15 PM, Don Mitchell <notifications@github.com>
wrote:

> In common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py:
>
> >
> >          fake_store = "fake"
> >          with self.assertRaisesRegexp(Exception, "Cannot find store of type {}".format(fake_store)):
> >              with self.store.default_store(fake_store):
> >                  pass  # pragma: no cover
> >
> > +    def save_asset(self, asset_key):
> > +        """
> > +        Load and save the given file. (taken from test_contentstore)
> > +        """
> > +        with open("{}/static/{}".format(DATA_DIR, asset_key.block_id), "rb") as f:
> > +            content = StaticContent(
> > +                asset_key, "Funky Pix", mimetypes.guess_type(asset_key.block_id)[0], f.read(),
> > +            )
> > +            self.store.contentstore.save(content)
> > +
> > +    @ddt.data(
> > +        [ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.mongo],
> > +        [ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split],
> > +        [ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.split]
> > +    )
>
> It will raise an exception. My grief with adding a test for it is that it
> raises an exception not b/c we decided it's wrong to try to do that cloning
> but b/c we decided not to implement it yet. I always think of tests as
> testing functional correctness not current state. I can add the test with
> that caveat I guess.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/edx-platform/pull/5759/files#r19486854>.
>