'Convenience function for testing command failures'

def assertCommandFailureRegexp(self, regex, *args):

    with self.assertRaisesRegexp(CommandError, regex):
        call_command('git_add_course', stderr=StringIO.StringIO(), *args)
