def test_no_old_course(self): locator = self.course.location errstring = "course does not exist in the old Mongo store" with self.assertRaisesRegexp(CommandError, errstring): Command().handle(str(locator))
def test_nonexistent_locator(self): locator = loc_mapper().translate_location(self.old_course.id, self.old_course.location) errstring = "No course found with locator" with self.assertRaisesRegexp(CommandError, errstring): Command().handle(str(locator))
def setUp(self): self.command = Command()