refactor: rename ItemFactory to BlockFactory

This commit is contained in:
Arunmozhi
2022-12-01 11:15:04 +05:30
committed by Agrendalath
parent 4a41208cf9
commit d417a7561f
145 changed files with 1351 additions and 1348 deletions

View File

@@ -18,7 +18,7 @@ from rest_framework.test import APIRequestFactory
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import ItemFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.tests.factories import BlockFactory, check_mongo_calls # lint-amnesty, pylint: disable=wrong-import-order
from ..api import (
UNKNOWN_BLOCK_DISPLAY_NAME, course_detail, get_due_dates, list_courses, get_course_members, get_course_run_url,
@@ -287,7 +287,7 @@ class TestGetCourseDates(CourseDetailTestMixin, SharedModuleStoreTestCase):
cls.yesterday = cls.today - timedelta(days=1)
cls.tomorrow = cls.today + timedelta(days=1)
cls.section_1 = ItemFactory.create(
cls.section_1 = BlockFactory.create(
category='chapter',
start=cls.yesterday,
due=cls.tomorrow,
@@ -295,7 +295,7 @@ class TestGetCourseDates(CourseDetailTestMixin, SharedModuleStoreTestCase):
display_name='section 1'
)
cls.subsection_1 = ItemFactory.create(
cls.subsection_1 = BlockFactory.create(
category='sequential',
parent=cls.section_1,
display_name='subsection 1'