Any reason you can't use the code in `modulestore.tests.factories`, rather than hand-coding the `create_and_save_xmodule` calls?