I think you should use `module_store.create_and_save_xmodule` here, rather than using the django test client. Actually, an even better fix would be to use a `CourseFactory` and a `ItemFactory`, so that this test doesn't have to know about future changes to how to construct xmodules.