'Test that CourseOverviews with old version numbers are thrown out.'

@ddt.data((ModuleStoreEnum.Type.mongo, 4, 4), (ModuleStoreEnum.Type.split, 3, 4))
@ddt.unpack
def test_versioning(self, modulestore_type, min_mongo_calls, max_mongo_calls):

    with self.store.default_store(modulestore_type):
        course = CourseFactory.create()
        course_overview = CourseOverview.get_from_id(course.id)
        course_overview.version = (CourseOverview.VERSION - 1)
        course_overview.save()
        with check_mongo_calls_range(max_finds=max_mongo_calls, min_finds=min_mongo_calls):
            _course_overview_2 = CourseOverview.get_from_id(course.id)
