I'm pretty sure we're moving away from using this way of mocking courses and using CourseFactory instead. There are a few examples of this floating around, and the definition for it is in common/lib/xmodule/xmodule/modulestore/tests/factories.py . @wedaly would have better information on how to use it and how to improve it if you need it to do more than it currently does.