From 563b713a3f5fb6247ade6280b2838428e60c819a Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Tue, 4 Mar 2014 09:23:51 -0500 Subject: [PATCH] Test exception on read-only db --- .../xmodule/modulestore/tests/test_mixed_modulestore.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py index f60a250e7b..a168705993 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py @@ -296,6 +296,14 @@ class TestMixedModuleStore(LocMapperSetupSansDjango): # this course is in the directory from which we loaded courses but not in the map self.assertNotIn("edX/toy/TT_2012_Fall", course_ids) + def test_xml_no_write(self): + """ + Test that the xml modulestore doesn't allow write ops. + """ + self.initdb('direct') + with self.assertRaises(NotImplementedError): + self.store.create_course("org/course/run", store_name='xml') + @ddt.data('direct', 'split') def test_get_course(self, default_ms): self.initdb(default_ms)