From 3221c2b91fec6a3a71a0f960b40bf6cb537a9ddb Mon Sep 17 00:00:00 2001 From: Michael Youngstrom Date: Mon, 11 Feb 2019 17:24:54 -0500 Subject: [PATCH] Remove lms pytest shards --- lms/djangoapps/badges/api/tests.py | 1 - .../backends/tests/test_badgr_backend.py | 1 - .../events/tests/test_course_complete.py | 1 - .../badges/events/tests/test_course_meta.py | 3 -- lms/djangoapps/badges/tests/test_models.py | 1 - lms/djangoapps/branding/tests/test_api.py | 2 -- lms/djangoapps/branding/tests/test_models.py | 1 - lms/djangoapps/branding/tests/test_page.py | 5 ---- lms/djangoapps/branding/tests/test_views.py | 2 -- .../bulk_email/tests/test_course_optout.py | 2 -- lms/djangoapps/bulk_email/tests/test_email.py | 5 ---- .../bulk_email/tests/test_err_handling.py | 1 - lms/djangoapps/bulk_email/tests/test_forms.py | 1 - .../bulk_email/tests/test_models.py | 5 ---- .../bulk_email/tests/test_signals.py | 1 - lms/djangoapps/bulk_email/tests/test_tasks.py | 1 - .../bulk_enroll/tests/test_views.py | 1 - lms/djangoapps/ccx/api/v0/tests/test_views.py | 2 -- .../ccx/tests/test_ccx_modulestore.py | 1 - .../tests/test_field_override_performance.py | 1 - lms/djangoapps/ccx/tests/test_models.py | 1 - lms/djangoapps/ccx/tests/test_overrides.py | 1 - lms/djangoapps/ccx/tests/test_tasks.py | 1 - lms/djangoapps/ccx/tests/test_utils.py | 1 - lms/djangoapps/ccx/tests/test_views.py | 5 ---- .../certificates/apis/v0/tests/test_views.py | 1 - lms/djangoapps/certificates/tests/test_api.py | 8 ----- .../tests/test_cert_management.py | 4 --- .../tests/test_create_fake_cert.py | 1 - .../certificates/tests/test_models.py | 7 ----- .../certificates/tests/test_queue.py | 2 -- .../certificates/tests/test_services.py | 1 - .../certificates/tests/test_signals.py | 6 ---- .../certificates/tests/test_support_views.py | 4 --- .../certificates/tests/test_tasks.py | 1 - .../certificates/tests/test_views.py | 2 -- .../certificates/tests/test_webview_views.py | 2 -- lms/djangoapps/certificates/tests/tests.py | 1 - .../tests/test_dashboard_data.py | 1 - .../class_dashboard/tests/test_views.py | 1 - .../commerce/api/v0/tests/test_views.py | 2 -- .../commerce/api/v1/tests/test_models.py | 1 - .../commerce/api/v1/tests/test_serializers.py | 1 - .../commerce/api/v1/tests/test_views.py | 2 -- .../commands/tests/test_configure_commerce.py | 1 - lms/djangoapps/commerce/tests/test_signals.py | 1 - lms/djangoapps/commerce/tests/test_utils.py | 3 -- lms/djangoapps/commerce/tests/test_views.py | 1 - .../course_api/blocks/tests/test_api.py | 5 ---- .../course_api/blocks/tests/test_forms.py | 1 - .../blocks/tests/test_serializers.py | 3 -- .../course_api/blocks/tests/test_views.py | 2 -- .../tests/test_block_completion.py | 1 - .../transformers/tests/test_block_counts.py | 1 - .../transformers/tests/test_block_depth.py | 1 - .../transformers/tests/test_milestones.py | 1 - .../transformers/tests/test_navigation.py | 2 -- .../transformers/tests/test_student_view.py | 1 - lms/djangoapps/course_api/tests/test_api.py | 6 ---- lms/djangoapps/course_api/tests/test_forms.py | 3 -- .../course_api/tests/test_permissions.py | 1 - .../course_api/tests/test_serializers.py | 1 - lms/djangoapps/course_api/tests/test_views.py | 5 ---- .../transformers/tests/test_hidden_content.py | 1 - .../tests/test_library_content.py | 1 - .../tests/test_load_override_data.py | 1 - .../transformers/tests/test_split_test.py | 1 - .../transformers/tests/test_start_date.py | 1 - .../tests/test_user_partitions.py | 2 -- .../transformers/tests/test_visibility.py | 1 - lms/djangoapps/course_goals/tests/test_api.py | 1 - .../course_wiki/tests/test_access.py | 5 ---- .../tests/test_comprehensive_theming.py | 1 - .../course_wiki/tests/test_middleware.py | 1 - lms/djangoapps/course_wiki/tests/test_tab.py | 1 - lms/djangoapps/course_wiki/tests/tests.py | 1 - .../commands/tests/test_dump_course.py | 1 - lms/djangoapps/courseware/tests/test_about.py | 9 ------ .../courseware/tests/test_access.py | 4 --- .../tests/test_comprehensive_theming.py | 1 - .../tests/test_context_processor.py | 1 - .../courseware/tests/test_course_info.py | 6 ---- .../courseware/tests/test_course_survey.py | 1 - .../courseware/tests/test_course_tools.py | 1 - .../courseware/tests/test_courses.py | 8 ----- .../tests/test_credit_requirements.py | 1 - .../courseware/tests/test_date_summary.py | 4 --- .../tests/test_discussion_xblock.py | 6 ---- .../tests/test_draft_modulestore.py | 1 - .../courseware/tests/test_entrance_exam.py | 1 - .../courseware/tests/test_favicon.py | 1 - .../courseware/tests/test_field_overrides.py | 4 --- .../courseware/tests/test_footer.py | 1 - .../courseware/tests/test_group_access.py | 1 - lms/djangoapps/courseware/tests/test_i18n.py | 4 --- .../courseware/tests/test_lti_integration.py | 2 -- .../courseware/tests/test_masquerade.py | 5 ---- .../courseware/tests/test_microsites.py | 1 - .../courseware/tests/test_middleware.py | 1 - .../courseware/tests/test_model_data.py | 7 ----- .../courseware/tests/test_module_render.py | 20 ------------- .../courseware/tests/test_navigation.py | 1 - .../courseware/tests/test_password_reset.py | 1 - .../tests/test_self_paced_overrides.py | 1 - .../courseware/tests/test_split_module.py | 2 -- .../tests/test_submitting_problems.py | 5 ---- lms/djangoapps/courseware/tests/test_tabs.py | 11 ------- .../tests/test_user_state_client.py | 1 - .../courseware/tests/test_video_handlers.py | 9 ------ .../courseware/tests/test_video_mongo.py | 7 ----- .../courseware/tests/test_video_xml.py | 1 - .../tests/test_view_authentication.py | 2 -- lms/djangoapps/courseware/tests/test_views.py | 22 -------------- .../courseware/tests/test_word_cloud.py | 1 - lms/djangoapps/courseware/tests/tests.py | 5 ---- .../coursewarehistoryextended/tests.py | 1 - .../commands/tests/test_git_add_course.py | 1 - .../dashboard/tests/test_sysadmin.py | 1 - .../discussion/tests/test_signals.py | 1 - lms/djangoapps/discussion/tests/test_tasks.py | 1 - lms/djangoapps/discussion/tests/test_views.py | 30 ------------------- .../discussion_api/tests/test_api.py | 13 -------- .../discussion_api/tests/test_forms.py | 3 -- .../discussion_api/tests/test_pagination.py | 1 - .../discussion_api/tests/test_permissions.py | 4 --- .../discussion_api/tests/test_render.py | 1 - .../discussion_api/tests/test_serializers.py | 6 ---- .../discussion_api/tests/test_views.py | 14 --------- .../django_comment_client/base/tests.py | 14 --------- .../mock_cs_server/test_mock_cs_server.py | 1 - .../tests/test_middleware.py | 1 - .../tests/test_models.py | 2 -- .../django_comment_client/tests/test_utils.py | 10 ------- lms/djangoapps/edxnotes/tests.py | 6 ---- .../email_marketing/tests/test_signals.py | 2 -- .../experiments/tests/test_views.py | 2 -- lms/djangoapps/gating/tests/test_api.py | 1 - .../gating/tests/test_integration.py | 1 - lms/djangoapps/gating/tests/test_signals.py | 1 - .../api/v1/tests/test_grading_policy_view.py | 3 -- .../grades/config/tests/test_models.py | 1 - .../commands/tests/test_compute_grades.py | 1 - .../test_recalculate_subsection_grades.py | 1 - .../grades/tests/integration/test_access.py | 1 - .../grades/tests/integration/test_events.py | 1 - .../grades/tests/integration/test_problems.py | 3 -- .../grades/tests/test_course_data.py | 1 - .../grades/tests/test_course_grade.py | 2 -- .../grades/tests/test_course_grade_factory.py | 1 - lms/djangoapps/grades/tests/test_models.py | 5 ---- lms/djangoapps/grades/tests/test_scores.py | 5 ---- lms/djangoapps/grades/tests/test_services.py | 1 - lms/djangoapps/grades/tests/test_signals.py | 1 - .../grades/tests/test_subsection_grade.py | 1 - .../tests/test_subsection_grade_factory.py | 1 - lms/djangoapps/grades/tests/test_tasks.py | 2 -- .../grades/tests/test_transformer.py | 2 -- .../instructor/tests/test_access.py | 5 ---- lms/djangoapps/instructor/tests/test_api.py | 20 ------------- .../tests/test_api_email_localization.py | 1 - .../instructor/tests/test_certificates.py | 7 ----- .../instructor/tests/test_ecommerce.py | 1 - lms/djangoapps/instructor/tests/test_email.py | 2 -- .../instructor/tests/test_enrollment.py | 9 ------ .../tests/test_enrollment_store_provider.py | 1 - .../instructor/tests/test_proctoring.py | 1 - .../tests/test_registration_codes.py | 1 - .../instructor/tests/test_services.py | 1 - .../instructor/tests/test_spoc_gradebook.py | 4 --- lms/djangoapps/instructor/tests/test_tools.py | 11 ------- .../tests/views/test_instructor_dashboard.py | 1 - .../instructor_analytics/tests/test_basic.py | 1 - .../instructor_analytics/tests/test_csvs.py | 3 -- .../tests/test_distributions.py | 2 -- .../commands/tests/test_fail_old_tasks.py | 1 - .../instructor_task/tests/test_api.py | 2 -- .../instructor_task/tests/test_base.py | 1 - .../instructor_task/tests/test_integration.py | 1 - .../instructor_task/tests/test_models.py | 2 -- .../instructor_task/tests/test_subtasks.py | 1 - .../instructor_task/tests/test_tasks.py | 4 --- .../tests/test_tasks_helper.py | 2 -- .../instructor_task/tests/test_views.py | 1 - .../learner_dashboard/tests/test_programs.py | 2 -- .../learner_dashboard/tests/test_utils.py | 1 - .../lms_xblock/test/test_runtime.py | 4 --- .../commands/tests/test_resend_lti_scores.py | 2 -- .../lti_provider/tests/test_outcomes.py | 4 --- .../tests/test_signature_validator.py | 3 -- .../lti_provider/tests/test_tasks.py | 2 -- .../lti_provider/tests/test_users.py | 4 --- .../lti_provider/tests/test_views.py | 1 - .../mobile_api/course_info/tests.py | 2 -- .../tests/test_context_processor.py | 1 - .../mobile_api/tests/test_decorator.py | 1 - .../mobile_api/tests/test_middleware.py | 1 - .../mobile_api/tests/test_milestones.py | 1 - .../mobile_api/tests/test_mobile_platform.py | 1 - lms/djangoapps/mobile_api/tests/test_model.py | 2 -- lms/djangoapps/mobile_api/users/tests.py | 9 ------ .../mobile_api/video_outlines/tests.py | 4 --- lms/djangoapps/oauth2_handler/tests.py | 3 -- lms/djangoapps/rss_proxy/tests/test_models.py | 1 - lms/djangoapps/rss_proxy/tests/test_views.py | 1 - .../management/tests/test_retire_order.py | 1 - .../processors/tests/test_CyberSource2.py | 1 - .../tests/test_configuration_overrides.py | 1 - .../tests/test_context_processor.py | 1 - .../shoppingcart/tests/test_models.py | 2 -- .../shoppingcart/tests/test_payment_fake.py | 1 - lms/djangoapps/shoppingcart/tests/test_pdf.py | 1 - .../shoppingcart/tests/test_reports.py | 2 -- .../shoppingcart/tests/test_views.py | 1 - .../static_template_view/tests/test_views.py | 1 - lms/djangoapps/support/tests/test_refund.py | 1 - lms/djangoapps/support/tests/test_views.py | 1 - lms/djangoapps/survey/tests/test_models.py | 1 - lms/djangoapps/survey/tests/test_signals.py | 1 - lms/djangoapps/survey/tests/test_utils.py | 1 - lms/djangoapps/survey/tests/test_views.py | 1 - .../tests/test_reindex_course_team.py | 1 - lms/djangoapps/teams/tests/test_models.py | 2 -- .../teams/tests/test_serializers.py | 4 --- lms/djangoapps/teams/tests/test_views.py | 14 --------- lms/djangoapps/tests/test_utils.py | 1 - .../commands/tests/test_verify_student.py | 1 - .../tests/test_fake_software_secure.py | 2 -- .../verify_student/tests/test_integration.py | 1 - .../verify_student/tests/test_models.py | 2 -- .../verify_student/tests/test_services.py | 1 - .../verify_student/tests/test_signals.py | 2 -- .../verify_student/tests/test_utils.py | 1 - .../verify_student/tests/test_views.py | 11 ------- .../test/test_lms_filter_generator.py | 1 - .../test/test_lms_result_processor.py | 1 - lms/lib/tests/test_utils.py | 1 - lms/lib/xblock/test/test_mixin.py | 5 ---- lms/tests.py | 3 -- 238 files changed, 673 deletions(-) diff --git a/lms/djangoapps/badges/api/tests.py b/lms/djangoapps/badges/api/tests.py index 35c23bab3d..647846608c 100644 --- a/lms/djangoapps/badges/api/tests.py +++ b/lms/djangoapps/badges/api/tests.py @@ -151,7 +151,6 @@ class TestUserBadgeAssertionsByClass(UserAssertionTestCase): """ Test the Badge Assertions view with the badge class filter. """ - shard = 3 @unpack @data((False, False), (True, False), (True, True)) diff --git a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py index 65cd069028..e97454c41f 100644 --- a/lms/djangoapps/badges/backends/tests/test_badgr_backend.py +++ b/lms/djangoapps/badges/backends/tests/test_badgr_backend.py @@ -35,7 +35,6 @@ class BadgrBackendTestCase(ModuleStoreTestCase, EventTrackingTestCase): """ Tests the BadgeHandler object """ - shard = 4 def setUp(self): """ diff --git a/lms/djangoapps/badges/events/tests/test_course_complete.py b/lms/djangoapps/badges/events/tests/test_course_complete.py index 2897a61b5c..967f0251a3 100644 --- a/lms/djangoapps/badges/events/tests/test_course_complete.py +++ b/lms/djangoapps/badges/events/tests/test_course_complete.py @@ -13,7 +13,6 @@ class CourseCompleteTestCase(ModuleStoreTestCase): """ Tests for the course completion helper functions. """ - shard = 4 def setUp(self): super(CourseCompleteTestCase, self).setUp() diff --git a/lms/djangoapps/badges/events/tests/test_course_meta.py b/lms/djangoapps/badges/events/tests/test_course_meta.py index f056e9d0e1..51721f2da1 100644 --- a/lms/djangoapps/badges/events/tests/test_course_meta.py +++ b/lms/djangoapps/badges/events/tests/test_course_meta.py @@ -21,7 +21,6 @@ class CourseEnrollmentBadgeTest(ModuleStoreTestCase): """ Tests the event which awards badges based on number of courses a user is enrolled in. """ - shard = 4 def setUp(self): super(CourseEnrollmentBadgeTest, self).setUp() @@ -72,7 +71,6 @@ class CourseCompletionBadgeTest(ModuleStoreTestCase): """ Tests the event which awards badges based on the number of courses completed. """ - shard = 4 def setUp(self): super(CourseCompletionBadgeTest, self).setUp() @@ -127,7 +125,6 @@ class CourseGroupBadgeTest(ModuleStoreTestCase): """ Tests the event which awards badges when a user completes a set of courses. """ - shard = 4 def setUp(self): super(CourseGroupBadgeTest, self).setUp() diff --git a/lms/djangoapps/badges/tests/test_models.py b/lms/djangoapps/badges/tests/test_models.py index ca0a8b2e10..995710fed0 100644 --- a/lms/djangoapps/badges/tests/test_models.py +++ b/lms/djangoapps/badges/tests/test_models.py @@ -36,7 +36,6 @@ class BadgeImageConfigurationTest(TestCase): """ Test the validation features of BadgeImageConfiguration. """ - shard = 1 def tearDown(self): tmp_path = Path(TEST_DATA_ROOT / 'course_complete_badges') diff --git a/lms/djangoapps/branding/tests/test_api.py b/lms/djangoapps/branding/tests/test_api.py index 336ce3bd46..eaff030d56 100644 --- a/lms/djangoapps/branding/tests/test_api.py +++ b/lms/djangoapps/branding/tests/test_api.py @@ -14,7 +14,6 @@ from edxmako.shortcuts import marketing_link class TestHeader(TestCase): """Test API end-point for retrieving the header. """ - shard = 4 def test_cdn_urls_for_logo(self): # Ordinarily, we'd use `override_settings()` to override STATIC_URL, @@ -42,7 +41,6 @@ class TestHeader(TestCase): class TestFooter(TestCase): - shard = 4 maxDiff = None """Test retrieving the footer. """ @mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True}) diff --git a/lms/djangoapps/branding/tests/test_models.py b/lms/djangoapps/branding/tests/test_models.py index f9393a1c86..ee7499cb31 100644 --- a/lms/djangoapps/branding/tests/test_models.py +++ b/lms/djangoapps/branding/tests/test_models.py @@ -11,7 +11,6 @@ class BrandingInfoConfigTest(TestCase): """ Test the BrandingInfoConfig model. """ - shard = 1 def setUp(self): super(BrandingInfoConfigTest, self).setUp() diff --git a/lms/djangoapps/branding/tests/test_page.py b/lms/djangoapps/branding/tests/test_page.py index cdd47524dc..0d826ab4a0 100644 --- a/lms/djangoapps/branding/tests/test_page.py +++ b/lms/djangoapps/branding/tests/test_page.py @@ -17,7 +17,6 @@ from branding.views import index from courseware.tests.helpers import LoginEnrollmentTestCase from edxmako.shortcuts import render_to_response from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin -from openedx.core.lib.tests import attr from util.milestones_helpers import set_prerequisite_courses from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -37,7 +36,6 @@ def mock_render_to_response(*args, **kwargs): RENDER_MOCK = Mock(side_effect=mock_render_to_response) -@attr(shard=1) class AnonymousIndexPageTest(ModuleStoreTestCase): """ Tests that anonymous users can access the '/' page, Need courses with start date @@ -109,7 +107,6 @@ class AnonymousIndexPageTest(ModuleStoreTestCase): self.assertEqual(response._headers.get("location")[1], "/login") # pylint: disable=protected-access -@attr(shard=1) class PreRequisiteCourseCatalog(ModuleStoreTestCase, LoginEnrollmentTestCase, MilestonesTestCaseMixin): """ Test to simulate and verify fix for disappearing courses in @@ -155,7 +152,6 @@ class PreRequisiteCourseCatalog(ModuleStoreTestCase, LoginEnrollmentTestCase, Mi self.assertIn('course that has pre requisite', resp.content) -@attr(shard=1) class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): """ Test for Index page course cards sorting @@ -290,7 +286,6 @@ class IndexPageCourseCardsSortingTests(ModuleStoreTestCase): self.assertEqual(context['courses'][2].id, self.course_with_default_start_date.id) -@attr(shard=1) class IndexPageProgramsTests(SiteMixin, ModuleStoreTestCase): """ Tests for Programs List in Marketing Pages. diff --git a/lms/djangoapps/branding/tests/test_views.py b/lms/djangoapps/branding/tests/test_views.py index 18e7747f2d..de8f1f993d 100644 --- a/lms/djangoapps/branding/tests/test_views.py +++ b/lms/djangoapps/branding/tests/test_views.py @@ -22,7 +22,6 @@ from student.tests.factories import UserFactory @ddt.ddt class TestFooter(CacheIsolationTestCase): """Test API end-point for retrieving the footer. """ - shard = 4 @ddt.data("*/*", "text/html", "application/json") def test_feature_flag(self, accepts): @@ -280,7 +279,6 @@ class TestFooter(CacheIsolationTestCase): class TestIndex(SiteMixin, TestCase): """ Test the index view """ - shard = 4 def setUp(self): """ Set up a user """ diff --git a/lms/djangoapps/bulk_email/tests/test_course_optout.py b/lms/djangoapps/bulk_email/tests/test_course_optout.py index f211ec44c3..1d209bbfa3 100644 --- a/lms/djangoapps/bulk_email/tests/test_course_optout.py +++ b/lms/djangoapps/bulk_email/tests/test_course_optout.py @@ -27,7 +27,6 @@ class TestOptoutCourseEmails(ModuleStoreTestCase): """ Test that optouts are referenced in sending course email. """ - shard = 1 def setUp(self): super(TestOptoutCourseEmails, self).setUp() @@ -122,7 +121,6 @@ class TestACEOptoutCourseEmails(ModuleStoreTestCase): """ Test that optouts are referenced in sending course email. """ - shard = 1 def setUp(self): super(TestACEOptoutCourseEmails, self).setUp() diff --git a/lms/djangoapps/bulk_email/tests/test_email.py b/lms/djangoapps/bulk_email/tests/test_email.py index 98bdd98bf0..89cc7f6fbf 100644 --- a/lms/djangoapps/bulk_email/tests/test_email.py +++ b/lms/djangoapps/bulk_email/tests/test_email.py @@ -25,7 +25,6 @@ from enrollment.api import update_enrollment from lms.djangoapps.instructor_task.subtasks import update_subtask_status from openedx.core.djangoapps.course_groups.cohorts import add_user_to_cohort from openedx.core.djangoapps.course_groups.models import CourseCohort -from openedx.core.lib.tests import attr from student.models import CourseEnrollment from student.roles import CourseStaffRole from student.tests.factories import CourseEnrollmentFactory, UserFactory @@ -168,7 +167,6 @@ class SendEmailWithMockedUgettextMixin(object): return mail.outbox[0] -@attr(shard=1) @patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False}) @ddt.ddt class LocalizedFromAddressPlatformLangTestCase(SendEmailWithMockedUgettextMixin, EmailSendFromDashboardTestCase): @@ -194,7 +192,6 @@ class LocalizedFromAddressPlatformLangTestCase(SendEmailWithMockedUgettextMixin, self.assertRegexpMatches(message.from_email, '@EO .* Course Staff@') -@attr(shard=1) @patch.dict(settings.FEATURES, {'ENABLE_INSTRUCTOR_EMAIL': True, 'REQUIRE_COURSE_EMAIL_AUTH': False}) @ddt.ddt class LocalizedFromAddressCourseLangTestCase(SendEmailWithMockedUgettextMixin, EmailSendFromDashboardTestCase): @@ -227,7 +224,6 @@ class LocalizedFromAddressCourseLangTestCase(SendEmailWithMockedUgettextMixin, E self.assertRegexpMatches(message.from_email, '@AR .* Course Staff@') -@attr(shard=1) @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True)) class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase): """ @@ -598,7 +594,6 @@ class TestEmailSendFromDashboardMockedHtmlToText(EmailSendFromDashboardTestCase) self.assertItemsEqual(outbox_contents, should_send_contents) -@attr(shard=1) @skipIf(os.environ.get("TRAVIS") == 'true', "Skip this test in Travis CI.") class TestEmailSendFromDashboard(EmailSendFromDashboardTestCase): """ diff --git a/lms/djangoapps/bulk_email/tests/test_err_handling.py b/lms/djangoapps/bulk_email/tests/test_err_handling.py index 257495a6b6..131bf0c61a 100644 --- a/lms/djangoapps/bulk_email/tests/test_err_handling.py +++ b/lms/djangoapps/bulk_email/tests/test_err_handling.py @@ -43,7 +43,6 @@ class TestEmailErrors(ModuleStoreTestCase): """ Test that errors from sending email are handled properly. """ - shard = 1 ENABLED_CACHES = ['default', 'mongo_metadata_inheritance', 'loc_cache'] diff --git a/lms/djangoapps/bulk_email/tests/test_forms.py b/lms/djangoapps/bulk_email/tests/test_forms.py index a616770444..851a2b7e7e 100644 --- a/lms/djangoapps/bulk_email/tests/test_forms.py +++ b/lms/djangoapps/bulk_email/tests/test_forms.py @@ -14,7 +14,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class CourseAuthorizationFormTest(ModuleStoreTestCase): """Test the CourseAuthorizationAdminForm form for Mongo-backed courses.""" - shard = 1 def setUp(self): super(CourseAuthorizationFormTest, self).setUp() diff --git a/lms/djangoapps/bulk_email/tests/test_models.py b/lms/djangoapps/bulk_email/tests/test_models.py index 04ec2e9223..c98c612ae1 100644 --- a/lms/djangoapps/bulk_email/tests/test_models.py +++ b/lms/djangoapps/bulk_email/tests/test_models.py @@ -21,14 +21,12 @@ from bulk_email.models import ( ) from course_modes.models import CourseMode from openedx.core.djangoapps.course_groups.models import CourseCohort -from openedx.core.lib.tests import attr from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @ddt.ddt -@attr(shard=1) @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True)) class CourseEmailTest(ModuleStoreTestCase): """Test the CourseEmail model.""" @@ -146,7 +144,6 @@ class CourseEmailTest(ModuleStoreTestCase): self.assertEqual(target.long_display(), 'Cohort: test cohort') -@attr(shard=1) class NoCourseEmailTemplateTest(TestCase): """Test the CourseEmailTemplate model without loading the template data.""" @@ -155,7 +152,6 @@ class NoCourseEmailTemplateTest(TestCase): CourseEmailTemplate.get_template() -@attr(shard=1) class CourseEmailTemplateTest(TestCase): """Test the CourseEmailTemplate model.""" @@ -254,7 +250,6 @@ class CourseEmailTemplateTest(TestCase): self.assertIn(context['name'], message) -@attr(shard=1) class CourseAuthorizationTest(TestCase): """Test the CourseAuthorization model.""" diff --git a/lms/djangoapps/bulk_email/tests/test_signals.py b/lms/djangoapps/bulk_email/tests/test_signals.py index 2c2b7f90d7..8673e4f1ea 100644 --- a/lms/djangoapps/bulk_email/tests/test_signals.py +++ b/lms/djangoapps/bulk_email/tests/test_signals.py @@ -21,7 +21,6 @@ class TestOptoutCourseEmailsBySignal(ModuleStoreTestCase): """ Tests that the force_optout_all signal receiver opts the user out of course emails """ - shard = 1 def setUp(self): super(TestOptoutCourseEmailsBySignal, self).setUp() diff --git a/lms/djangoapps/bulk_email/tests/test_tasks.py b/lms/djangoapps/bulk_email/tests/test_tasks.py index 88995fc366..aa1f253784 100644 --- a/lms/djangoapps/bulk_email/tests/test_tasks.py +++ b/lms/djangoapps/bulk_email/tests/test_tasks.py @@ -76,7 +76,6 @@ def my_update_subtask_status(entry_id, current_task_id, new_subtask_status): @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True)) class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase): """Tests instructor task that send bulk email.""" - shard = 5 def setUp(self): super(TestBulkEmailInstructorTask, self).setUp() diff --git a/lms/djangoapps/bulk_enroll/tests/test_views.py b/lms/djangoapps/bulk_enroll/tests/test_views.py index 1c4eb1af0f..444b81b037 100644 --- a/lms/djangoapps/bulk_enroll/tests/test_views.py +++ b/lms/djangoapps/bulk_enroll/tests/test_views.py @@ -34,7 +34,6 @@ class BulkEnrollmentTest(ModuleStoreTestCase, LoginEnrollmentTestCase, APITestCa """ Test the bulk enrollment endpoint """ - shard = 4 USERNAME = "Bob" EMAIL = "bob@example.com" diff --git a/lms/djangoapps/ccx/api/v0/tests/test_views.py b/lms/djangoapps/ccx/api/v0/tests/test_views.py index 9c15f87dcf..2960301759 100644 --- a/lms/djangoapps/ccx/api/v0/tests/test_views.py +++ b/lms/djangoapps/ccx/api/v0/tests/test_views.py @@ -166,7 +166,6 @@ class CcxListTest(CcxRestApiTest): Test for the CCX REST APIs """ ENABLED_SIGNALS = ['course_published'] - shard = 9 @classmethod def setUpClass(cls): @@ -877,7 +876,6 @@ class CcxDetailTest(CcxRestApiTest): Test for the CCX REST APIs """ ENABLED_SIGNALS = ['course_published'] - shard = 9 def setUp(self): """ diff --git a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py index 92032df4dd..c1c3f94d99 100644 --- a/lms/djangoapps/ccx/tests/test_ccx_modulestore.py +++ b/lms/djangoapps/ccx/tests/test_ccx_modulestore.py @@ -17,7 +17,6 @@ from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory class TestCCXModulestoreWrapper(SharedModuleStoreTestCase): """tests for a modulestore wrapped by CCXModulestoreWrapper """ - shard = 7 MODULESTORE = TEST_DATA_SPLIT_MODULESTORE @classmethod diff --git a/lms/djangoapps/ccx/tests/test_field_override_performance.py b/lms/djangoapps/ccx/tests/test_field_override_performance.py index 3c95f82f8e..3dd8407b4c 100644 --- a/lms/djangoapps/ccx/tests/test_field_override_performance.py +++ b/lms/djangoapps/ccx/tests/test_field_override_performance.py @@ -53,7 +53,6 @@ class FieldOverridePerformanceTestCase(FieldOverrideTestMixin, ProceduralCourseT __test__ = False # Tell Django to clean out all databases, not just default multi_db = True - shard = 7 # TEST_DATA must be overridden by subclasses TEST_DATA = None diff --git a/lms/djangoapps/ccx/tests/test_models.py b/lms/djangoapps/ccx/tests/test_models.py index 84ce29b2d7..8bc19a0d73 100644 --- a/lms/djangoapps/ccx/tests/test_models.py +++ b/lms/djangoapps/ccx/tests/test_models.py @@ -22,7 +22,6 @@ class TestCCX(ModuleStoreTestCase): """ MODULESTORE = TEST_DATA_SPLIT_MODULESTORE - shard = 7 def setUp(self): """common setup for all tests""" diff --git a/lms/djangoapps/ccx/tests/test_overrides.py b/lms/djangoapps/ccx/tests/test_overrides.py index 9cb3a50783..7fefec3d4e 100644 --- a/lms/djangoapps/ccx/tests/test_overrides.py +++ b/lms/djangoapps/ccx/tests/test_overrides.py @@ -31,7 +31,6 @@ class TestFieldOverrides(FieldOverrideTestMixin, SharedModuleStoreTestCase): Make sure field overrides behave in the expected manner. """ MODULESTORE = TEST_DATA_SPLIT_MODULESTORE - shard = 7 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/ccx/tests/test_tasks.py b/lms/djangoapps/ccx/tests/test_tasks.py index a2f83cb2d6..3dea8f2713 100644 --- a/lms/djangoapps/ccx/tests/test_tasks.py +++ b/lms/djangoapps/ccx/tests/test_tasks.py @@ -28,7 +28,6 @@ class TestSendCCXCoursePublished(ModuleStoreTestCase): """ Unit tests for the send ccx course published task """ - shard = 7 MODULESTORE = TEST_DATA_SPLIT_MODULESTORE ENABLED_SIGNALS = ['course_published'] diff --git a/lms/djangoapps/ccx/tests/test_utils.py b/lms/djangoapps/ccx/tests/test_utils.py index 9f6108e4e8..cc700cb86c 100644 --- a/lms/djangoapps/ccx/tests/test_utils.py +++ b/lms/djangoapps/ccx/tests/test_utils.py @@ -22,7 +22,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class TestGetCCXFromCCXLocator(ModuleStoreTestCase): """Verify that get_ccx_from_ccx_locator functions properly""" MODULESTORE = TEST_DATA_SPLIT_MODULESTORE - shard = 7 def setUp(self): """Set up a course, coach, ccx and user""" diff --git a/lms/djangoapps/ccx/tests/test_views.py b/lms/djangoapps/ccx/tests/test_views.py index c878cdd2a5..877298b6b4 100644 --- a/lms/djangoapps/ccx/tests/test_views.py +++ b/lms/djangoapps/ccx/tests/test_views.py @@ -37,7 +37,6 @@ from lms.djangoapps.ccx.views import get_date from lms.djangoapps.grades.tasks import compute_all_grades_for_course from lms.djangoapps.instructor.access import allow_access, list_with_level from openedx.core.djangoapps.content.course_overviews.models import CourseOverview -from openedx.core.lib.tests import attr from student.models import CourseEnrollment, CourseEnrollmentAllowed from student.roles import CourseCcxCoachRole, CourseInstructorRole, CourseStaffRole from student.tests.factories import AdminFactory, CourseEnrollmentFactory, UserFactory @@ -167,7 +166,6 @@ class TestAdminAccessCoachDashboard(CcxTestCase, LoginEnrollmentTestCase): self.assertEqual(response.status_code, 403) -@attr(shard=7) @override_settings( XBLOCK_FIELD_DATA_WRAPPERS=['lms.djangoapps.courseware.field_overrides:OverrideModulestoreFieldData.wrap'], MODULESTORE_FIELD_OVERRIDE_PROVIDERS=['ccx.overrides.CustomCoursesForEdxOverrideProvider'], @@ -282,7 +280,6 @@ class TestCCXProgressChanges(CcxTestCase, LoginEnrollmentTestCase): self.assert_progress_summary(ccx_course_key, due) -@attr(shard=7) @override_settings( XBLOCK_FIELD_DATA_WRAPPERS=['lms.djangoapps.courseware.field_overrides:OverrideModulestoreFieldData.wrap'], MODULESTORE_FIELD_OVERRIDE_PROVIDERS=['ccx.overrides.CustomCoursesForEdxOverrideProvider'], @@ -839,7 +836,6 @@ class TestCoachDashboard(CcxTestCase, LoginEnrollmentTestCase): ) -@attr(shard=7) class TestCoachDashboardSchedule(CcxTestCase, LoginEnrollmentTestCase, ModuleStoreTestCase): """ Tests of the CCX Coach Dashboard which need to modify the course content. @@ -981,7 +977,6 @@ def patched_get_children(self, usage_key_filter=None): return list(iter_children()) -@attr(shard=7) @override_settings( XBLOCK_FIELD_DATA_WRAPPERS=['lms.djangoapps.courseware.field_overrides:OverrideModulestoreFieldData.wrap'], MODULESTORE_FIELD_OVERRIDE_PROVIDERS=['ccx.overrides.CustomCoursesForEdxOverrideProvider'], diff --git a/lms/djangoapps/certificates/apis/v0/tests/test_views.py b/lms/djangoapps/certificates/apis/v0/tests/test_views.py index bbc190f55e..a6d6f3c705 100644 --- a/lms/djangoapps/certificates/apis/v0/tests/test_views.py +++ b/lms/djangoapps/certificates/apis/v0/tests/test_views.py @@ -25,7 +25,6 @@ class CertificatesRestApiTest(AuthAndScopesTestMixin, SharedModuleStoreTestCase, """ Test for the Certificates REST APIs """ - shard = 4 now = timezone.now() default_scopes = CertificatesDetailView.required_scopes diff --git a/lms/djangoapps/certificates/tests/test_api.py b/lms/djangoapps/certificates/tests/test_api.py index 417c7020c2..4a497742ba 100644 --- a/lms/djangoapps/certificates/tests/test_api.py +++ b/lms/djangoapps/certificates/tests/test_api.py @@ -33,7 +33,6 @@ from course_modes.tests.factories import CourseModeFactory from courseware.tests.factories import GlobalStaffFactory from lms.djangoapps.grades.tests.utils import mock_passing_grade from microsite_configuration import microsite -from openedx.core.lib.tests import attr from student.models import CourseEnrollment from student.tests.factories import UserFactory from util.testing import EventTestMixin @@ -83,7 +82,6 @@ class WebCertificateTestMixin(object): self.store.update_item(self.course, self.user.id) -@attr(shard=1) @ddt.ddt class CertificateDownloadableStatusTests(WebCertificateTestMixin, ModuleStoreTestCase): """Tests for the `certificate_downloadable_status` helper function. """ @@ -234,7 +232,6 @@ class CertificateDownloadableStatusTests(WebCertificateTestMixin, ModuleStoreTes ) -@attr(shard=1) @ddt.ddt class CertificateisInvalid(WebCertificateTestMixin, ModuleStoreTestCase): """Tests for the `is_certificate_invalid` helper function. """ @@ -346,7 +343,6 @@ class CertificateisInvalid(WebCertificateTestMixin, ModuleStoreTestCase): ) -@attr(shard=1) class CertificateGetTests(SharedModuleStoreTestCase): """Tests for the `test_get_certificate_for_user` helper function. """ now = timezone.now() @@ -514,7 +510,6 @@ class CertificateGetTests(SharedModuleStoreTestCase): ) -@attr(shard=1) @override_settings(CERT_QUEUE='certificates') class GenerateUserCertificatesTest(EventTestMixin, WebCertificateTestMixin, ModuleStoreTestCase): """Tests for generating certificates for students. """ @@ -610,7 +605,6 @@ class GenerateUserCertificatesTest(EventTestMixin, WebCertificateTestMixin, Modu self.assertEqual(url, "") -@attr(shard=1) @ddt.ddt class CertificateGenerationEnabledTest(EventTestMixin, TestCase): """Test enabling/disabling self-generated certificates for a course. """ @@ -678,7 +672,6 @@ class CertificateGenerationEnabledTest(EventTestMixin, TestCase): self.assertEqual(expect_enabled, actual_enabled) -@attr(shard=1) class GenerateExampleCertificatesTest(TestCase): """Test generation of example certificates. """ @@ -766,7 +759,6 @@ def set_microsite(domain): @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) -@attr(shard=1) class CertificatesBrandingTest(TestCase): """Test certificates branding. """ diff --git a/lms/djangoapps/certificates/tests/test_cert_management.py b/lms/djangoapps/certificates/tests/test_cert_management.py index f49e6dc555..4fef69f08f 100644 --- a/lms/djangoapps/certificates/tests/test_cert_management.py +++ b/lms/djangoapps/certificates/tests/test_cert_management.py @@ -13,7 +13,6 @@ from badges.tests.factories import BadgeAssertionFactory, CourseCompleteImageCon from lms.djangoapps.certificates.models import CertificateStatuses, GeneratedCertificate from course_modes.models import CourseMode from lms.djangoapps.grades.tests.utils import mock_passing_grade -from openedx.core.lib.tests import attr from student.tests.factories import CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, check_mongo_calls @@ -60,7 +59,6 @@ class CertificateManagementTest(ModuleStoreTestCase): self.assertEqual(cert.status, expected_status) -@attr(shard=1) @ddt.ddt class ResubmitErrorCertificatesTest(CertificateManagementTest): """Tests for the resubmit_error_certificates management command. """ @@ -149,7 +147,6 @@ class ResubmitErrorCertificatesTest(CertificateManagementTest): @ddt.ddt -@attr(shard=1) class RegenerateCertificatesTest(CertificateManagementTest): """ Tests for regenerating certificates. @@ -219,7 +216,6 @@ class RegenerateCertificatesTest(CertificateManagementTest): self.assertFalse(mock_send_to_queue.called) -@attr(shard=1) class UngenerateCertificatesTest(CertificateManagementTest): """ Tests for generating certificates. diff --git a/lms/djangoapps/certificates/tests/test_create_fake_cert.py b/lms/djangoapps/certificates/tests/test_create_fake_cert.py index aa67adffc0..d8a3a296f8 100644 --- a/lms/djangoapps/certificates/tests/test_create_fake_cert.py +++ b/lms/djangoapps/certificates/tests/test_create_fake_cert.py @@ -12,7 +12,6 @@ from student.tests.factories import UserFactory class CreateFakeCertTest(TestCase): """Tests for the create_fake_certs management command. """ - shard = 1 USERNAME = "test" COURSE_KEY = CourseLocator(org='edX', course='DemoX', run='Demo_Course') diff --git a/lms/djangoapps/certificates/tests/test_models.py b/lms/djangoapps/certificates/tests/test_models.py index 3c894ccad1..3387595ddc 100644 --- a/lms/djangoapps/certificates/tests/test_models.py +++ b/lms/djangoapps/certificates/tests/test_models.py @@ -22,7 +22,6 @@ from lms.djangoapps.certificates.models import ( ) from lms.djangoapps.certificates.tests.factories import CertificateInvalidationFactory, GeneratedCertificateFactory from lms.djangoapps.instructor_task.tests.factories import InstructorTaskFactory -from openedx.core.lib.tests import attr from student.tests.factories import AdminFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -37,7 +36,6 @@ PLATFORM_ROOT = TEST_DIR.parent.parent.parent.parent TEST_DATA_ROOT = PLATFORM_ROOT / TEST_DATA_DIR -@attr(shard=1) class ExampleCertificateTest(TestCase): """Tests for the ExampleCertificate model. """ @@ -103,7 +101,6 @@ class ExampleCertificateTest(TestCase): self.assertIs(result, None) -@attr(shard=1) class CertificateHtmlViewConfigurationTest(TestCase): """ Test the CertificateHtmlViewConfiguration model. @@ -170,7 +167,6 @@ class CertificateHtmlViewConfigurationTest(TestCase): self.assertEquals(self.config.get_config(), {}) -@attr(shard=1) class CertificateTemplateAssetTest(TestCase): """ Test Assets are uploading/saving successfully for CertificateTemplateAsset. @@ -198,7 +194,6 @@ class CertificateTemplateAssetTest(TestCase): self.assertEqual(certificate_template_asset.asset, 'certificate_template_assets/1/picture2.jpg') -@attr(shard=1) class EligibleCertificateManagerTest(SharedModuleStoreTestCase): """ Test the GeneratedCertificate model's object manager for filtering @@ -237,7 +232,6 @@ class EligibleCertificateManagerTest(SharedModuleStoreTestCase): ) -@attr(shard=1) @ddt.ddt class TestCertificateGenerationHistory(TestCase): """ @@ -303,7 +297,6 @@ class TestCertificateGenerationHistory(TestCase): ) -@attr(shard=1) class CertificateInvalidationTest(SharedModuleStoreTestCase): """ Test for the Certificate Invalidation model. diff --git a/lms/djangoapps/certificates/tests/test_queue.py b/lms/djangoapps/certificates/tests/test_queue.py index f8312c11e9..7f1307fa2f 100644 --- a/lms/djangoapps/certificates/tests/test_queue.py +++ b/lms/djangoapps/certificates/tests/test_queue.py @@ -33,7 +33,6 @@ from xmodule.modulestore.tests.factories import CourseFactory @override_settings(CERT_QUEUE='certificates') class XQueueCertInterfaceAddCertificateTest(ModuleStoreTestCase): """Test the "add to queue" operation of the XQueue interface. """ - shard = 1 def setUp(self): super(XQueueCertInterfaceAddCertificateTest, self).setUp() @@ -281,7 +280,6 @@ class XQueueCertInterfaceAddCertificateTest(ModuleStoreTestCase): @override_settings(CERT_QUEUE='certificates') class XQueueCertInterfaceExampleCertificateTest(TestCase): """Tests for the XQueue interface for certificate generation. """ - shard = 1 COURSE_KEY = CourseLocator(org='test', course='test', run='test') diff --git a/lms/djangoapps/certificates/tests/test_services.py b/lms/djangoapps/certificates/tests/test_services.py index 190e0a9e34..a6e51e43aa 100644 --- a/lms/djangoapps/certificates/tests/test_services.py +++ b/lms/djangoapps/certificates/tests/test_services.py @@ -13,7 +13,6 @@ class CertificateServiceTests(ModuleStoreTestCase): """ Tests for the Certificate service """ - shard = 4 def setUp(self): super(CertificateServiceTests, self).setUp() diff --git a/lms/djangoapps/certificates/tests/test_signals.py b/lms/djangoapps/certificates/tests/test_signals.py index 499a10aa16..bf1250d466 100644 --- a/lms/djangoapps/certificates/tests/test_signals.py +++ b/lms/djangoapps/certificates/tests/test_signals.py @@ -26,7 +26,6 @@ class SelfGeneratedCertsSignalTest(ModuleStoreTestCase): """ Tests for enabling/disabling self-generated certificates according to course-pacing. """ - shard = 4 ENABLED_SIGNALS = ['course_published'] def setUp(self): @@ -54,7 +53,6 @@ class WhitelistGeneratedCertificatesTest(ModuleStoreTestCase): """ Tests for whitelisted student auto-certificate generation """ - shard = 4 def setUp(self): super(WhitelistGeneratedCertificatesTest, self).setUp() @@ -135,7 +133,6 @@ class PassingGradeCertsTest(ModuleStoreTestCase): """ Tests for certificate generation task firing on passing grade receipt """ - shard = 4 def setUp(self): super(PassingGradeCertsTest, self).setUp() @@ -229,7 +226,6 @@ class FailingGradeCertsTest(ModuleStoreTestCase): and that the signal has no effect on the cert status if the cert has a non-passing status """ - shard = 4 def setUp(self): super(FailingGradeCertsTest, self).setUp() @@ -285,7 +281,6 @@ class LearnerTrackChangeCertsTest(ModuleStoreTestCase): """ Tests for certificate generation task firing on learner verification """ - shard = 4 def setUp(self): super(LearnerTrackChangeCertsTest, self).setUp() @@ -358,7 +353,6 @@ class CertificateGenerationTaskTest(ModuleStoreTestCase): """ Tests for certificate generation task. """ - shard = 4 def setUp(self): super(CertificateGenerationTaskTest, self).setUp() diff --git a/lms/djangoapps/certificates/tests/test_support_views.py b/lms/djangoapps/certificates/tests/test_support_views.py index 144ee08f0d..882bffc039 100644 --- a/lms/djangoapps/certificates/tests/test_support_views.py +++ b/lms/djangoapps/certificates/tests/test_support_views.py @@ -26,7 +26,6 @@ class CertificateSupportTestCase(ModuleStoreTestCase): """ Base class for tests of the certificate support views. """ - shard = 4 SUPPORT_USERNAME = "support" SUPPORT_EMAIL = "support@example.com" @@ -92,7 +91,6 @@ class CertificateSearchTests(CertificateSupportTestCase): """ Tests for the certificate search end-point used by the support team. """ - shard = 4 def setUp(self): """ @@ -229,7 +227,6 @@ class CertificateRegenerateTests(CertificateSupportTestCase): """ Tests for the certificate regeneration end-point used by the support team. """ - shard = 4 def setUp(self): """ @@ -412,7 +409,6 @@ class CertificateGenerateTests(CertificateSupportTestCase): """ Tests for the certificate generation end-point used by the support team. """ - shard = 4 def setUp(self): """ diff --git a/lms/djangoapps/certificates/tests/test_tasks.py b/lms/djangoapps/certificates/tests/test_tasks.py index 21fadbdc36..7111e27a50 100644 --- a/lms/djangoapps/certificates/tests/test_tasks.py +++ b/lms/djangoapps/certificates/tests/test_tasks.py @@ -10,7 +10,6 @@ from student.tests.factories import UserFactory @ddt.ddt class GenerateUserCertificateTest(TestCase): - shard = 4 @patch('lms.djangoapps.certificates.tasks.generate_user_certificates') @patch('lms.djangoapps.certificates.tasks.User.objects.get') diff --git a/lms/djangoapps/certificates/tests/test_views.py b/lms/djangoapps/certificates/tests/test_views.py index 7f777cf08e..b76835f4a0 100644 --- a/lms/djangoapps/certificates/tests/test_views.py +++ b/lms/djangoapps/certificates/tests/test_views.py @@ -39,7 +39,6 @@ FEATURES_WITH_CUSTOM_CERTS_ENABLED.update(FEATURES_WITH_CERTS_ENABLED) @ddt.ddt class UpdateExampleCertificateViewTest(CacheIsolationTestCase): """Tests for the XQueue callback that updates example certificates. """ - shard = 1 COURSE_KEY = CourseLocator(org='test', course='test', run='test') @@ -184,7 +183,6 @@ class MicrositeCertificatesViewsTests(ModuleStoreTestCase): """ Tests for the microsite certificates web/html views """ - shard = 1 def setUp(self): super(MicrositeCertificatesViewsTests, self).setUp() diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 52c40a2f49..53b5efc8e7 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -246,7 +246,6 @@ class CertificatesViewsTests(CommonCertificatesTestCase, CacheIsolationTestCase) """ Tests for the certificates web/html views """ - shard = 1 def setUp(self): super(CertificatesViewsTests, self).setUp() @@ -1715,7 +1714,6 @@ class CertificateEventTests(CommonCertificatesTestCase, EventTrackingTestCase): """ Test events emitted by certificate handling. """ - shard = 1 @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) def test_certificate_evidence_event_emitted(self): diff --git a/lms/djangoapps/certificates/tests/tests.py b/lms/djangoapps/certificates/tests/tests.py index fec34b4124..655d691f43 100644 --- a/lms/djangoapps/certificates/tests/tests.py +++ b/lms/djangoapps/certificates/tests/tests.py @@ -28,7 +28,6 @@ class CertificatesModelTest(ModuleStoreTestCase, MilestonesTestCaseMixin): """ Tests for the GeneratedCertificate model """ - shard = 1 def setUp(self): super(CertificatesModelTest, self).setUp() diff --git a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py index 9ddf5ffe94..0d23bc0043 100644 --- a/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py +++ b/lms/djangoapps/class_dashboard/tests/test_dashboard_data.py @@ -35,7 +35,6 @@ class TestGetProblemGradeDistribution(SharedModuleStoreTestCase): """ Tests related to class_dashboard/dashboard_data.py """ - shard = 6 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/class_dashboard/tests/test_views.py b/lms/djangoapps/class_dashboard/tests/test_views.py index d662b730c0..fed7c09acb 100644 --- a/lms/djangoapps/class_dashboard/tests/test_views.py +++ b/lms/djangoapps/class_dashboard/tests/test_views.py @@ -17,7 +17,6 @@ class TestViews(ModuleStoreTestCase): """ Tests related to class_dashboard/views.py """ - shard = 1 def setUp(self): super(TestViews, self).setUp() diff --git a/lms/djangoapps/commerce/api/v0/tests/test_views.py b/lms/djangoapps/commerce/api/v0/tests/test_views.py index 7870b79a64..4215be4d23 100644 --- a/lms/djangoapps/commerce/api/v0/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v0/tests/test_views.py @@ -39,7 +39,6 @@ class BasketsViewTests(EnrollmentEventTestMixin, UserMixin, ModuleStoreTestCase) """ Tests for the commerce Baskets view. """ - shard = 1 def _post_to_view(self, course_id=None, marketing_email_opt_in=False, include_utm_cookie=False): """ @@ -284,7 +283,6 @@ class BasketOrderViewTests(UserMixin, TestCase): view_name = 'commerce_api:v0:baskets:retrieve_order' MOCK_ORDER = {'number': 1} path = reverse_lazy(view_name, kwargs={'basket_id': 1}) - shard = 1 def setUp(self): super(BasketOrderViewTests, self).setUp() diff --git a/lms/djangoapps/commerce/api/v1/tests/test_models.py b/lms/djangoapps/commerce/api/v1/tests/test_models.py index 6087040a54..0c48775893 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_models.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_models.py @@ -10,7 +10,6 @@ from ..models import Course @ddt.ddt class CourseTests(TestCase): """ Tests for Course model. """ - shard = 4 def setUp(self): super(CourseTests, self).setUp() diff --git a/lms/djangoapps/commerce/api/v1/tests/test_serializers.py b/lms/djangoapps/commerce/api/v1/tests/test_serializers.py index df88362c47..c17b069122 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_serializers.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_serializers.py @@ -6,7 +6,6 @@ from ..serializers import serializers, validate_course_id class CourseValidatorTests(TestCase): """ Tests for Course Validator method. """ - shard = 4 def test_validate_course_id_with_non_existent_course(self): """ Verify a validator checking non-existent courses.""" diff --git a/lms/djangoapps/commerce/api/v1/tests/test_views.py b/lms/djangoapps/commerce/api/v1/tests/test_views.py index af36ca8ec5..5e6055570e 100644 --- a/lms/djangoapps/commerce/api/v1/tests/test_views.py +++ b/lms/djangoapps/commerce/api/v1/tests/test_views.py @@ -109,7 +109,6 @@ class CourseRetrieveUpdateViewTests(CourseApiViewTestMixin, ModuleStoreTestCase) NOW: datetime.now(), None: None, } - shard = 3 def setUp(self): super(CourseRetrieveUpdateViewTests, self).setUp() @@ -398,7 +397,6 @@ class OrderViewTests(UserMixin, TestCase): ORDER_NUMBER = 'EDX-100001' MOCK_ORDER = {'number': ORDER_NUMBER} path = reverse_lazy(view_name, kwargs={'number': ORDER_NUMBER}) - shard = 1 def setUp(self): super(OrderViewTests, self).setUp() diff --git a/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py b/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py index 1e9570b3a8..4e781d2d0f 100644 --- a/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py +++ b/lms/djangoapps/commerce/management/commands/tests/test_configure_commerce.py @@ -11,7 +11,6 @@ class TestCommerceConfigurationCommand(TestCase): """ Test django management command for enabling commerce configuration. """ - shard = 4 def test_commerce_configuration(self): """ diff --git a/lms/djangoapps/commerce/tests/test_signals.py b/lms/djangoapps/commerce/tests/test_signals.py index 152c2a1ccb..358fc038d6 100644 --- a/lms/djangoapps/commerce/tests/test_signals.py +++ b/lms/djangoapps/commerce/tests/test_signals.py @@ -37,7 +37,6 @@ class TestRefundSignal(TestCase): """ Exercises logic triggered by the REFUND_ORDER signal. """ - shard = 4 def setUp(self): super(TestRefundSignal, self).setUp() diff --git a/lms/djangoapps/commerce/tests/test_utils.py b/lms/djangoapps/commerce/tests/test_utils.py index 3137d71d3d..fe72978e5f 100644 --- a/lms/djangoapps/commerce/tests/test_utils.py +++ b/lms/djangoapps/commerce/tests/test_utils.py @@ -38,7 +38,6 @@ def update_commerce_config(enabled=False, checkout_page='/test_basket/add/'): class AuditLogTests(TestCase): """Tests of the commerce audit logging helper.""" - shard = 4 @patch('openedx.core.lib.log_utils.log') def test_log_message(self, mock_log): @@ -54,7 +53,6 @@ class AuditLogTests(TestCase): @ddt.ddt class EcommerceServiceTests(TestCase): """Tests for the EcommerceService helper class.""" - shard = 4 def setUp(self): self.request_factory = RequestFactory() @@ -185,7 +183,6 @@ class EcommerceServiceTests(TestCase): @skip_unless_lms class RefundUtilMethodTests(ModuleStoreTestCase): """Tests for Refund Utilities""" - shard = 4 def setUp(self): super(RefundUtilMethodTests, self).setUp() diff --git a/lms/djangoapps/commerce/tests/test_views.py b/lms/djangoapps/commerce/tests/test_views.py index f06e68ed77..1437ca3bbe 100644 --- a/lms/djangoapps/commerce/tests/test_views.py +++ b/lms/djangoapps/commerce/tests/test_views.py @@ -29,7 +29,6 @@ class UserMixin(object): @ddt.ddt class ReceiptViewTests(UserMixin, ModuleStoreTestCase): """ Tests for the receipt view. """ - shard = 1 def setUp(self): """ diff --git a/lms/djangoapps/course_api/blocks/tests/test_api.py b/lms/djangoapps/course_api/blocks/tests/test_api.py index fe7816b8ed..565a5490d1 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_api.py +++ b/lms/djangoapps/course_api/blocks/tests/test_api.py @@ -27,7 +27,6 @@ class TestGetBlocks(SharedModuleStoreTestCase): """ Tests for the get_blocks function """ - shard = 4 @classmethod def setUpClass(cls): @@ -117,7 +116,6 @@ class TestGetBlocksMobileHack(SharedModuleStoreTestCase): """ Tests that requests from the mobile app don't receive empty containers. """ - shard = 4 @classmethod def setUpClass(cls): @@ -165,7 +163,6 @@ class TestGetBlocksQueryCountsBase(SharedModuleStoreTestCase): """ Base for the get_blocks tests. """ - shard = 4 ENABLED_SIGNALS = ['course_published'] @@ -198,7 +195,6 @@ class TestGetBlocksQueryCounts(TestGetBlocksQueryCountsBase): """ Tests query counts for the get_blocks function. """ - shard = 4 @ddt.data( *product( @@ -247,7 +243,6 @@ class TestQueryCountsWithIndividualOverrideProvider(TestGetBlocksQueryCountsBase """ Tests query counts for the get_blocks function when IndividualStudentOverrideProvider is set. """ - shard = 4 @ddt.data( *product( diff --git a/lms/djangoapps/course_api/blocks/tests/test_forms.py b/lms/djangoapps/course_api/blocks/tests/test_forms.py index aa1a17711c..fbb8eb5f41 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_forms.py +++ b/lms/djangoapps/course_api/blocks/tests/test_forms.py @@ -22,7 +22,6 @@ class TestBlockListGetForm(FormTestMixin, SharedModuleStoreTestCase): """ Tests for BlockListGetForm """ - shard = 4 FORM_CLASS = BlockListGetForm diff --git a/lms/djangoapps/course_api/blocks/tests/test_serializers.py b/lms/djangoapps/course_api/blocks/tests/test_serializers.py index 3fbb46e83f..53861d389a 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_serializers.py +++ b/lms/djangoapps/course_api/blocks/tests/test_serializers.py @@ -20,7 +20,6 @@ class TestBlockSerializerBase(SharedModuleStoreTestCase): """ Base class for testing BlockSerializer and BlockDictSerializer """ - shard = 4 @classmethod def setUpClass(cls): @@ -153,7 +152,6 @@ class TestBlockSerializer(TestBlockSerializerBase): """ Tests the BlockSerializer class, which returns a list of blocks. """ - shard = 4 def create_serializer(self, context=None): """ @@ -195,7 +193,6 @@ class TestBlockDictSerializer(TestBlockSerializerBase): """ Tests the BlockDictSerializer class, which returns a dict of blocks key-ed by its block_key. """ - shard = 4 def create_serializer(self, context=None): """ diff --git a/lms/djangoapps/course_api/blocks/tests/test_views.py b/lms/djangoapps/course_api/blocks/tests/test_views.py index 241fc015ae..6855293c7b 100644 --- a/lms/djangoapps/course_api/blocks/tests/test_views.py +++ b/lms/djangoapps/course_api/blocks/tests/test_views.py @@ -21,7 +21,6 @@ class TestBlocksView(SharedModuleStoreTestCase): """ Test class for BlocksView """ - shard = 4 requested_fields = ['graded', 'format', 'student_view_multi_device', 'children', 'not_a_field', 'due'] BLOCK_TYPES_WITH_STUDENT_VIEW_DATA = ['video', 'discussion', 'html'] @@ -251,7 +250,6 @@ class TestBlocksInCourseView(TestBlocksView): """ Test class for BlocksInCourseView """ - shard = 4 def setUp(self): super(TestBlocksInCourseView, self).setUp() diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py index 7c3d3e121f..3d1312d291 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_completion.py @@ -41,7 +41,6 @@ class BlockCompletionTransformerTestCase(TransformerRegistryTestMixin, Completio """ Tests behaviour of BlockCompletionTransformer """ - shard = 4 TRANSFORMER_CLASS_TO_TEST = BlockCompletionTransformer COMPLETION_TEST_VALUE = 0.4 diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py index 4de92874d3..1d44630b6f 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_counts.py @@ -14,7 +14,6 @@ class TestBlockCountsTransformer(ModuleStoreTestCase): """ Test behavior of BlockCountsTransformer """ - shard = 4 def setUp(self): super(TestBlockCountsTransformer, self).setUp() diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py index b93d3fee8a..ee07a49486 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_block_depth.py @@ -19,7 +19,6 @@ class BlockDepthTransformerTestCase(TestCase, ChildrenMapTestMixin): """ Test behavior of BlockDepthTransformer """ - shard = 4 @ddt.data( (0, [], [], []), diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py index 115e69fcde..7c2dc353d0 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_milestones.py @@ -22,7 +22,6 @@ class MilestonesTransformerTestCase(CourseStructureTestCase, MilestonesTestCaseM Test behavior of ProctoredExamTransformer """ TRANSFORMER_CLASS_TO_TEST = MilestonesAndSpecialExamsTransformer - shard = 3 def setUp(self): """ diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py index 814f503ed6..5db1fc9c2b 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_navigation.py @@ -21,7 +21,6 @@ class BlockNavigationTransformerTestCase(TestCase, ChildrenMapTestMixin): """ Course-agnostic test class for testing the Navigation transformer. """ - shard = 4 @ddt.data( (0, 0, [], []), @@ -72,7 +71,6 @@ class BlockNavigationTransformerCourseTestCase(ModuleStoreTestCase): Uses SampleCourseFactory and Modulestore to test the Navigation transformer, specifically to test enforcement of the hide_from_toc field """ - shard = 4 def test_hide_from_toc(self): course_key = SampleCourseFactory.create().id diff --git a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py index 281868406a..4ea53ce661 100644 --- a/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py +++ b/lms/djangoapps/course_api/blocks/transformers/tests/test_student_view.py @@ -16,7 +16,6 @@ class TestStudentViewTransformer(ModuleStoreTestCase): """ Test proper behavior for StudentViewTransformer """ - shard = 4 def setUp(self): super(TestStudentViewTransformer, self).setUp() diff --git a/lms/djangoapps/course_api/tests/test_api.py b/lms/djangoapps/course_api/tests/test_api.py index 8ffdceae1e..5e7d2f10a9 100644 --- a/lms/djangoapps/course_api/tests/test_api.py +++ b/lms/djangoapps/course_api/tests/test_api.py @@ -22,7 +22,6 @@ class CourseApiTestMixin(CourseApiFactoryMixin): """ Establish basic functionality for Course API tests """ - shard = 4 @classmethod def setUpClass(cls): @@ -58,7 +57,6 @@ class TestGetCourseDetail(CourseDetailTestMixin, SharedModuleStoreTestCase): """ Test course_detail api function """ - shard = 4 @classmethod def setUpClass(cls): @@ -94,7 +92,6 @@ class CourseListTestMixin(CourseApiTestMixin): """ Common behavior for list_courses tests """ - shard = 4 def _make_api_call(self, requesting_user, specified_user, org=None, filter_=None): """ @@ -118,7 +115,6 @@ class TestGetCourseList(CourseListTestMixin, SharedModuleStoreTestCase): """ Test the behavior of the `list_courses` api function. """ - shard = 4 ENABLED_SIGNALS = ['course_published'] @classmethod @@ -161,7 +157,6 @@ class TestGetCourseListMultipleCourses(CourseListTestMixin, ModuleStoreTestCase) Test the behavior of the `list_courses` api function (with tests that modify the courseware). """ - shard = 4 ENABLED_SIGNALS = ['course_published'] def setUp(self): @@ -220,7 +215,6 @@ class TestGetCourseListExtras(CourseListTestMixin, ModuleStoreTestCase): Tests of course_list api function that require alternative configurations of created courses. """ - shard = 4 ENABLED_SIGNALS = ['course_published'] @classmethod diff --git a/lms/djangoapps/course_api/tests/test_forms.py b/lms/djangoapps/course_api/tests/test_forms.py index 4bd3cf1b44..ae8fff4e23 100644 --- a/lms/djangoapps/course_api/tests/test_forms.py +++ b/lms/djangoapps/course_api/tests/test_forms.py @@ -21,7 +21,6 @@ class UsernameTestMixin(object): """ Tests the username Form field. """ - shard = 4 def test_no_user_param_anonymous_access(self): self.set_up_data(AnonymousUser()) @@ -39,7 +38,6 @@ class TestCourseListGetForm(FormTestMixin, UsernameTestMixin, SharedModuleStoreT """ Tests for CourseListGetForm """ - shard = 4 FORM_CLASS = CourseListGetForm @classmethod @@ -105,7 +103,6 @@ class TestCourseDetailGetForm(FormTestMixin, UsernameTestMixin, SharedModuleStor """ Tests for CourseDetailGetForm """ - shard = 4 FORM_CLASS = CourseDetailGetForm @classmethod diff --git a/lms/djangoapps/course_api/tests/test_permissions.py b/lms/djangoapps/course_api/tests/test_permissions.py index 77c27e1a36..62efdbdfa7 100644 --- a/lms/djangoapps/course_api/tests/test_permissions.py +++ b/lms/djangoapps/course_api/tests/test_permissions.py @@ -16,7 +16,6 @@ class ViewCoursesForUsernameTestCase(CourseApiFactoryMixin, TestCase): Any user should be able to view their own courses, and staff users should be able to view anyone's courses. """ - shard = 4 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/course_api/tests/test_serializers.py b/lms/djangoapps/course_api/tests/test_serializers.py index 770ea18754..59d073b93a 100644 --- a/lms/djangoapps/course_api/tests/test_serializers.py +++ b/lms/djangoapps/course_api/tests/test_serializers.py @@ -29,7 +29,6 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase): expected_mongo_calls = 0 maxDiff = 5000 # long enough to show mismatched dicts, in case of error serializer_class = CourseSerializer - shard = 3 ENABLED_SIGNALS = ['course_published'] diff --git a/lms/djangoapps/course_api/tests/test_views.py b/lms/djangoapps/course_api/tests/test_views.py index 3f80570739..4ca9cecf2a 100644 --- a/lms/djangoapps/course_api/tests/test_views.py +++ b/lms/djangoapps/course_api/tests/test_views.py @@ -16,7 +16,6 @@ from search.tests.utils import SearcherMixin from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from edx_django_utils.cache import RequestCache -from openedx.core.lib.tests import attr from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_duration_limits.models import CourseDurationLimitConfig from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, SharedModuleStoreTestCase @@ -62,7 +61,6 @@ class CourseApiTestViewMixin(CourseApiFactoryMixin): return response -@attr(shard=9) @ddt.ddt class CourseListViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase): """ @@ -144,7 +142,6 @@ class CourseListViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase): self.assert_throttle_configured_correctly(user_scope, throws_exception, expected_rate) -@attr(shard=9) class CourseListViewTestCaseMultipleCourses(CourseApiTestViewMixin, ModuleStoreTestCase): """ Test responses returned from CourseListView (with tests that modify the @@ -206,7 +203,6 @@ class CourseListViewTestCaseMultipleCourses(CourseApiTestViewMixin, ModuleStoreT ) -@attr(shard=9) class CourseDetailViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase): """ Test responses returned from CourseDetailView. @@ -274,7 +270,6 @@ class CourseDetailViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase self.assertEquals(response.status_code, 400) -@attr(shard=9) @override_settings(ELASTIC_FIELD_MAPPINGS={ 'start_date': {'type': 'date'}, 'enrollment_start': {'type': 'date'}, diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py index a7e22b89b2..61366cd40d 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_hidden_content.py @@ -17,7 +17,6 @@ class HiddenContentTransformerTestCase(BlockParentsMapTestCase): """ TRANSFORMER_CLASS_TO_TEST = HiddenContentTransformer ALL_BLOCKS = {0, 1, 2, 3, 4, 5, 6} - shard = 3 class DueDateType(object): """ diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py index 8fed845790..3c4db113e9 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_library_content.py @@ -26,7 +26,6 @@ class ContentLibraryTransformerTestCase(CourseStructureTestCase): """ ContentLibraryTransformer Test """ - shard = 4 TRANSFORMER_CLASS_TO_TEST = ContentLibraryTransformer def setUp(self): diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py index 90aaf5ee97..14d551f81b 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_load_override_data.py @@ -30,7 +30,6 @@ class TestOverrideDataTransformer(ModuleStoreTestCase): """ Test proper behavior for OverrideDataTransformer """ - shard = 4 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py index 689961e76f..1e8873e0f9 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_split_test.py @@ -22,7 +22,6 @@ class SplitTestTransformerTestCase(CourseStructureTestCase): """ TEST_PARTITION_ID = 0 TRANSFORMER_CLASS_TO_TEST = UserPartitionTransformer - shard = 3 def setUp(self): """ diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py b/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py index 2cf7d914cf..6204754968 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py @@ -21,7 +21,6 @@ class StartDateTransformerTestCase(BlockParentsMapTestCase): STUDENT = 1 BETA_USER = 2 TRANSFORMER_CLASS_TO_TEST = StartDateTransformer - shard = 3 class StartDateType(object): """ diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py index aa1912c34d..67a8ded484 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_user_partitions.py @@ -73,7 +73,6 @@ class UserPartitionTransformerTestCase(UserPartitionTestMixin, CourseStructureTe """ UserPartitionTransformer Test """ - shard = 3 def setup_partitions_and_course(self, active=True): """ @@ -247,7 +246,6 @@ class MergedGroupAccessTestData(UserPartitionTestMixin, CourseStructureTestCase) """ _MergedGroupAccess Test """ - shard = 3 def setUp(self): """ diff --git a/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py b/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py index bcdd3ebab5..1f9c7a6e43 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_visibility.py @@ -13,7 +13,6 @@ class VisibilityTransformerTestCase(BlockParentsMapTestCase): VisibilityTransformer Test """ TRANSFORMER_CLASS_TO_TEST = VisibilityTransformer - shard = 3 # Following test cases are based on BlockParentsMapTestCase.parents_map @ddt.data( diff --git a/lms/djangoapps/course_goals/tests/test_api.py b/lms/djangoapps/course_goals/tests/test_api.py index 2d29d97067..6966ee7248 100644 --- a/lms/djangoapps/course_goals/tests/test_api.py +++ b/lms/djangoapps/course_goals/tests/test_api.py @@ -22,7 +22,6 @@ class TestCourseGoalsAPI(EventTrackingTestCase, SharedModuleStoreTestCase): """ Testing the Course Goals API. """ - shard = 4 def setUp(self): # Create a course with a verified track diff --git a/lms/djangoapps/course_wiki/tests/test_access.py b/lms/djangoapps/course_wiki/tests/test_access.py index c075979414..e6de1463df 100644 --- a/lms/djangoapps/course_wiki/tests/test_access.py +++ b/lms/djangoapps/course_wiki/tests/test_access.py @@ -9,7 +9,6 @@ from course_wiki import settings from course_wiki.utils import course_wiki_slug, user_is_article_course_staff from course_wiki.views import get_or_create_root from courseware.tests.factories import InstructorFactory, StaffFactory -from openedx.core.lib.tests import attr from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -51,7 +50,6 @@ class TestWikiAccessBase(ModuleStoreTestCase): ] -@attr(shard=1) class TestWikiAccess(TestWikiAccessBase): """Test wiki access for course staff.""" def setUp(self): @@ -112,7 +110,6 @@ class TestWikiAccess(TestWikiAccessBase): self.assertFalse(user_is_article_course_staff(course_staff, self.wiki_310b.article)) -@attr(shard=1) class TestWikiAccessForStudent(TestWikiAccessBase): """Test access for students.""" def setUp(self): @@ -128,7 +125,6 @@ class TestWikiAccessForStudent(TestWikiAccessBase): self.assertFalse(user_is_article_course_staff(self.student, page.article)) -@attr(shard=1) class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase): """Test staff has access if course number is numerical and wiki slug has an underscore appended.""" def setUp(self): @@ -148,7 +144,6 @@ class TestWikiAccessForNumericalCourseNumber(TestWikiAccessBase): self.assertTrue(user_is_article_course_staff(course_staff, page.article)) -@attr(shard=1) class TestWikiAccessForOldFormatCourseStaffGroups(TestWikiAccessBase): """Test staff has access if course group has old format.""" def setUp(self): diff --git a/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py b/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py index b01baebef7..2d2c9c7453 100644 --- a/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py +++ b/lms/djangoapps/course_wiki/tests/test_comprehensive_theming.py @@ -15,7 +15,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class TestComprehensiveTheming(ModuleStoreTestCase): """Tests for comprehensive theming of wiki pages.""" - shard = 1 def setUp(self): """Test setup.""" diff --git a/lms/djangoapps/course_wiki/tests/test_middleware.py b/lms/djangoapps/course_wiki/tests/test_middleware.py index c0d6209073..71b037c480 100644 --- a/lms/djangoapps/course_wiki/tests/test_middleware.py +++ b/lms/djangoapps/course_wiki/tests/test_middleware.py @@ -13,7 +13,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class TestWikiAccessMiddleware(ModuleStoreTestCase): """Tests for WikiAccessMiddleware.""" - shard = 1 def setUp(self): """Test setup.""" diff --git a/lms/djangoapps/course_wiki/tests/test_tab.py b/lms/djangoapps/course_wiki/tests/test_tab.py index fb9ade601f..87b322f280 100644 --- a/lms/djangoapps/course_wiki/tests/test_tab.py +++ b/lms/djangoapps/course_wiki/tests/test_tab.py @@ -13,7 +13,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class WikiTabTestCase(ModuleStoreTestCase): """Test cases for Wiki Tab.""" - shard = 4 def setUp(self): super(WikiTabTestCase, self).setUp() diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index b02a52d045..9990ba3207 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -16,7 +16,6 @@ class WikiRedirectTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCas """ Tests for wiki course redirection. """ - shard = 1 def setUp(self): super(WikiRedirectTestCase, self).setUp() diff --git a/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py b/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py index d8b60c4928..182368b948 100644 --- a/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py +++ b/lms/djangoapps/courseware/management/commands/tests/test_dump_course.py @@ -37,7 +37,6 @@ class CommandsTestBase(SharedModuleStoreTestCase): __test__ = False url_name = '2012_Fall' ENABLED_SIGNALS = ['course_published'] - shard = 1 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/courseware/tests/test_about.py b/lms/djangoapps/courseware/tests/test_about.py index 5108de1379..1f6a483c63 100644 --- a/lms/djangoapps/courseware/tests/test_about.py +++ b/lms/djangoapps/courseware/tests/test_about.py @@ -16,7 +16,6 @@ from waffle.testutils import override_switch from course_modes.models import CourseMode from lms.djangoapps.ccx.tests.factories import CcxFactory -from openedx.core.lib.tests import attr from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag from openedx.features.course_experience.waffle import WAFFLE_NAMESPACE as COURSE_EXPERIENCE_WAFFLE_NAMESPACE from openedx.features.course_experience.waffle import ENABLE_COURSE_ABOUT_SIDEBAR_HTML @@ -51,7 +50,6 @@ SHIB_ERROR_STR = "The currently logged-in user account does not have permission @ddt.ddt -@attr(shard=1) class AboutTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase, EventTrackingTestCase, MilestonesTestCaseMixin): """ Tests about xblock. @@ -254,7 +252,6 @@ class AboutTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase, EventTra self.assertIn("Enroll in", resp.content) -@attr(shard=1) class AboutTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): """ Tests for the course about page @@ -302,7 +299,6 @@ class AboutTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertIn(self.xml_data, resp.content) -@attr(shard=1) class AboutWithCappedEnrollmentsTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): """ This test case will check the About page when a course has a capped enrollment @@ -349,7 +345,6 @@ class AboutWithCappedEnrollmentsTestCase(LoginEnrollmentTestCase, SharedModuleSt self.assertNotIn(REG_STR, resp.content) -@attr(shard=1) class AboutWithInvitationOnly(SharedModuleStoreTestCase): """ This test case will check the About page when a course is invitation only. @@ -395,7 +390,6 @@ class AboutWithInvitationOnly(SharedModuleStoreTestCase): self.assertIn(REG_STR, resp.content) -@attr(shard=1) @patch.dict(settings.FEATURES, {'RESTRICT_ENROLL_BY_REG_METHOD': True}) class AboutTestCaseShibCourse(LoginEnrollmentTestCase, SharedModuleStoreTestCase): """ @@ -436,7 +430,6 @@ class AboutTestCaseShibCourse(LoginEnrollmentTestCase, SharedModuleStoreTestCase self.assertIn(REG_STR, resp.content) -@attr(shard=1) class AboutWithClosedEnrollment(ModuleStoreTestCase): """ This test case will check the About page for a course that has enrollment start/end @@ -479,7 +472,6 @@ class AboutWithClosedEnrollment(ModuleStoreTestCase): self.assertNotIn('$10', resp.content) -@attr(shard=1) @ddt.ddt class AboutSidebarHTMLTestCase(SharedModuleStoreTestCase): """ @@ -523,7 +515,6 @@ class AboutSidebarHTMLTestCase(SharedModuleStoreTestCase): self.assertNotIn('
', resp.content) -@attr(shard=1) @patch.dict(settings.FEATURES, {'ENABLE_SHOPPING_CART': True}) @patch.dict(settings.FEATURES, {'ENABLE_PAID_COURSE_REGISTRATION': True}) class AboutPurchaseCourseTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index dec5361fb0..827c8b3fad 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -30,7 +30,6 @@ from courseware.tests.helpers import LoginEnrollmentTestCase, masquerade_as_grou from lms.djangoapps.ccx.models import CustomCourseForEdX from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES -from openedx.core.lib.tests import attr from openedx.features.content_type_gating.models import ContentTypeGatingConfig from student.models import CourseEnrollment from student.roles import CourseCcxCoachRole, CourseStaffRole @@ -157,7 +156,6 @@ class CoachAccessTestCaseCCX(SharedModuleStoreTestCase, LoginEnrollmentTestCase) self.assertEqual(resp.status_code, 404) -@attr(shard=1) @ddt.ddt class AccessTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, MilestonesTestCaseMixin): """ @@ -673,7 +671,6 @@ class AccessTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, MilestonesTes self.assertEqual(response.status_code, 200) -@attr(shard=1) class UserRoleTestCase(TestCase): """ Tests for user roles. @@ -730,7 +727,6 @@ class UserRoleTestCase(TestCase): ) -@attr(shard=5) @ddt.ddt class CourseOverviewAccessTestCase(ModuleStoreTestCase): """ diff --git a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py index 2205695c2f..6ed4b37545 100644 --- a/lms/djangoapps/courseware/tests/test_comprehensive_theming.py +++ b/lms/djangoapps/courseware/tests/test_comprehensive_theming.py @@ -12,7 +12,6 @@ from openedx.core.lib.tempdir import create_symlink, delete_symlink, mkdtemp_cle class TestComprehensiveTheming(TestCase): """Test comprehensive theming.""" - shard = 4 def setUp(self): super(TestComprehensiveTheming, self).setUp() diff --git a/lms/djangoapps/courseware/tests/test_context_processor.py b/lms/djangoapps/courseware/tests/test_context_processor.py index e8d9e8ca14..39c36d0a94 100644 --- a/lms/djangoapps/courseware/tests/test_context_processor.py +++ b/lms/djangoapps/courseware/tests/test_context_processor.py @@ -14,7 +14,6 @@ class UserPrefContextProcessorUnitTest(ModuleStoreTestCase): """ Unit test for courseware context_processor """ - shard = 4 def setUp(self): super(UserPrefContextProcessorUnitTest, self).setUp() diff --git a/lms/djangoapps/courseware/tests/test_course_info.py b/lms/djangoapps/courseware/tests/test_course_info.py index 96ce07cbf4..26d9807a63 100644 --- a/lms/djangoapps/courseware/tests/test_course_info.py +++ b/lms/djangoapps/courseware/tests/test_course_info.py @@ -15,7 +15,6 @@ from lms.djangoapps.ccx.tests.factories import CcxFactory from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration_context from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES, override_waffle_flag -from openedx.core.lib.tests import attr from openedx.features.content_type_gating.models import ContentTypeGatingConfig from openedx.features.course_experience import UNIFIED_COURSE_TAB_FLAG from openedx.features.enterprise_support.tests.mixins.enterprise import EnterpriseTestConsentRequired @@ -39,7 +38,6 @@ from .helpers import LoginEnrollmentTestCase QUERY_COUNT_TABLE_BLACKLIST = WAFFLE_TABLES -@attr(shard=1) @override_waffle_flag(UNIFIED_COURSE_TAB_FLAG, active=False) class CourseInfoTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCase, SharedModuleStoreTestCase): """ @@ -153,7 +151,6 @@ class CourseInfoTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCase, self.assertEqual(response.status_code, 404) -@attr(shard=1) @override_waffle_flag(UNIFIED_COURSE_TAB_FLAG, active=False) class CourseInfoLastAccessedTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): """ @@ -222,7 +219,6 @@ class CourseInfoLastAccessedTestCase(LoginEnrollmentTestCase, ModuleStoreTestCas self.assertEqual(resume_course_url, section_url) -@attr(shard=1) @override_waffle_flag(UNIFIED_COURSE_TAB_FLAG, active=False) @ddt.ddt class CourseInfoTitleTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase): @@ -352,7 +348,6 @@ class CourseInfoTestCaseCCX(SharedModuleStoreTestCase, LoginEnrollmentTestCase): self.assertRedirects(response, expected, status_code=302, target_status_code=200) -@attr(shard=1) @override_waffle_flag(UNIFIED_COURSE_TAB_FLAG, active=False) class CourseInfoTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): """ @@ -401,7 +396,6 @@ class CourseInfoTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertNotIn(self.xml_data, resp.content) -@attr(shard=1) @override_settings(FEATURES=dict(settings.FEATURES, EMBARGO=False)) @override_waffle_flag(UNIFIED_COURSE_TAB_FLAG, active=False) class SelfPacedCourseInfoTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): diff --git a/lms/djangoapps/courseware/tests/test_course_survey.py b/lms/djangoapps/courseware/tests/test_course_survey.py index 6ae7e2a675..e8f0d12065 100644 --- a/lms/djangoapps/courseware/tests/test_course_survey.py +++ b/lms/djangoapps/courseware/tests/test_course_survey.py @@ -19,7 +19,6 @@ class SurveyViewsTests(LoginEnrollmentTestCase, SharedModuleStoreTestCase, XssTe """ All tests for the views.py file """ - shard = 1 STUDENT_INFO = [('view@test.com', 'foo')] @classmethod diff --git a/lms/djangoapps/courseware/tests/test_course_tools.py b/lms/djangoapps/courseware/tests/test_course_tools.py index 76d68241e6..dfd9bfd2f5 100644 --- a/lms/djangoapps/courseware/tests/test_course_tools.py +++ b/lms/djangoapps/courseware/tests/test_course_tools.py @@ -23,7 +23,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class VerifiedUpgradeToolTest(SharedModuleStoreTestCase): - shard = 3 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/courseware/tests/test_courses.py b/lms/djangoapps/courseware/tests/test_courses.py index a7a960ef2f..10397306dc 100644 --- a/lms/djangoapps/courseware/tests/test_courses.py +++ b/lms/djangoapps/courseware/tests/test_courses.py @@ -34,7 +34,6 @@ from courseware.module_render import get_module_for_descriptor from lms.djangoapps.courseware.courseware_access_exception import CoursewareAccessException from openedx.core.djangolib.testing.utils import get_mock_request from openedx.core.lib.courses import course_image_url -from openedx.core.lib.tests import attr from student.tests.factories import UserFactory from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import _get_modulestore_branch_setting, modulestore @@ -48,7 +47,6 @@ CMS_BASE_TEST = 'testcms' TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT -@attr(shard=1) @ddt.ddt class CoursesTest(ModuleStoreTestCase): """Test methods related to fetching courses.""" @@ -192,7 +190,6 @@ class CoursesTest(ModuleStoreTestCase): self.assertIsNone(get_current_child(mock_xmodule)) -@attr(shard=1) class ModuleStoreBranchSettingTest(ModuleStoreTestCase): """Test methods related to the modulestore branch setting.""" @mock.patch( @@ -218,7 +215,6 @@ class ModuleStoreBranchSettingTest(ModuleStoreTestCase): self.assertEqual(_get_modulestore_branch_setting(), 'fake_default_branch') -@attr(shard=1) @override_settings(CMS_BASE=CMS_BASE_TEST) class MongoCourseImageTestCase(ModuleStoreTestCase): """Tests for course image URLs when using a mongo modulestore.""" @@ -274,7 +270,6 @@ class MongoCourseImageTestCase(ModuleStoreTestCase): ) -@attr(shard=1) class XmlCourseImageTestCase(XModuleXmlImportTest): """Tests for course image URLs when using an xml modulestore.""" @@ -292,7 +287,6 @@ class XmlCourseImageTestCase(XModuleXmlImportTest): self.assertEquals(course_image_url(course), u'/static/xml_test_course/before after.jpg') -@attr(shard=1) class CoursesRenderTest(ModuleStoreTestCase): """Test methods related to rendering courses content.""" @@ -385,7 +379,6 @@ class CourseEnrollmentOpenTests(ModuleStoreTestCase): self.assertFalse(course_open_for_self_enrollment(course.id)) -@attr(shard=1) @ddt.ddt class CourseInstantiationTests(ModuleStoreTestCase): """ @@ -430,7 +423,6 @@ class CourseInstantiationTests(ModuleStoreTestCase): self.assertTrue(item.graded) -@attr(shard=1) class TestGetCourseChapters(ModuleStoreTestCase): """ Tests for the `get_course_chapter_ids` function. diff --git a/lms/djangoapps/courseware/tests/test_credit_requirements.py b/lms/djangoapps/courseware/tests/test_credit_requirements.py index e47953a716..187d2c28e4 100644 --- a/lms/djangoapps/courseware/tests/test_credit_requirements.py +++ b/lms/djangoapps/courseware/tests/test_credit_requirements.py @@ -21,7 +21,6 @@ class ProgressPageCreditRequirementsTest(SharedModuleStoreTestCase): """ Tests for credit requirement display on the progress page. """ - shard = 4 USERNAME = "bob" PASSWORD = "test" diff --git a/lms/djangoapps/courseware/tests/test_date_summary.py b/lms/djangoapps/courseware/tests/test_date_summary.py index a7eed93241..97b84f2752 100644 --- a/lms/djangoapps/courseware/tests/test_date_summary.py +++ b/lms/djangoapps/courseware/tests/test_date_summary.py @@ -36,14 +36,12 @@ from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration from openedx.core.djangoapps.site_configuration.tests.factories import SiteFactory from openedx.core.djangoapps.user_api.preferences.api import set_user_preference from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag -from openedx.core.lib.tests import attr from openedx.features.course_experience import UNIFIED_COURSE_TAB_FLAG, UPGRADE_DEADLINE_MESSAGE, CourseHomeMessages from student.tests.factories import TEST_PASSWORD, CourseEnrollmentFactory, UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory -@attr(shard=1) @ddt.ddt class CourseDateSummaryTest(SharedModuleStoreTestCase): """Tests for course date summary blocks.""" @@ -450,7 +448,6 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase): self.assertEqual(block.relative_datestring, expected_date_string) -@attr(shard=1) @ddt.ddt class TestDateAlerts(SharedModuleStoreTestCase): """ @@ -567,7 +564,6 @@ class TestDateAlerts(SharedModuleStoreTestCase): @ddt.ddt -@attr(shard=1) class TestScheduleOverrides(SharedModuleStoreTestCase): def setUp(self): diff --git a/lms/djangoapps/courseware/tests/test_discussion_xblock.py b/lms/djangoapps/courseware/tests/test_discussion_xblock.py index 45cde8ef83..69dad92cd6 100644 --- a/lms/djangoapps/courseware/tests/test_discussion_xblock.py +++ b/lms/djangoapps/courseware/tests/test_discussion_xblock.py @@ -31,7 +31,6 @@ class TestDiscussionXBlock(XModuleRenderingTestBase): Base class for tests """ - shard = 4 PATCH_DJANGO_USER = True def setUp(self): @@ -85,7 +84,6 @@ class TestGetDjangoUser(TestDiscussionXBlock): Tests for the django_user property. """ - shard = 4 PATCH_DJANGO_USER = False def setUp(self): @@ -123,7 +121,6 @@ class TestViews(TestDiscussionXBlock): """ Tests for student_view and author_view. """ - shard = 4 def setUp(self): """ @@ -210,7 +207,6 @@ class TestTemplates(TestDiscussionXBlock): """ Tests rendering of templates. """ - shard = 4 def test_has_permission(self): """ @@ -256,7 +252,6 @@ class TestXBlockInCourse(SharedModuleStoreTestCase): """ Test the discussion xblock as rendered in the course and course API. """ - shard = 4 @classmethod def setUpClass(cls): @@ -380,7 +375,6 @@ class TestXBlockQueryLoad(SharedModuleStoreTestCase): """ Test the number of queries executed when rendering the XBlock. """ - shard = 4 def test_permissions_query_load(self): """ diff --git a/lms/djangoapps/courseware/tests/test_draft_modulestore.py b/lms/djangoapps/courseware/tests/test_draft_modulestore.py index 9566f90829..ebc841de5b 100644 --- a/lms/djangoapps/courseware/tests/test_draft_modulestore.py +++ b/lms/djangoapps/courseware/tests/test_draft_modulestore.py @@ -8,7 +8,6 @@ class TestDraftModuleStore(TestCase): """ Test the draft modulestore """ - shard = 1 def test_get_items_with_course_items(self): store = modulestore() diff --git a/lms/djangoapps/courseware/tests/test_entrance_exam.py b/lms/djangoapps/courseware/tests/test_entrance_exam.py index 7e90f571e4..50ba07ce2e 100644 --- a/lms/djangoapps/courseware/tests/test_entrance_exam.py +++ b/lms/djangoapps/courseware/tests/test_entrance_exam.py @@ -43,7 +43,6 @@ class EntranceExamTestCases(LoginEnrollmentTestCase, ModuleStoreTestCase, Milest Creates a test course from scratch. The tests below are designed to execute workflows regardless of the feature flag settings. """ - shard = 2 @patch.dict('django.conf.settings.FEATURES', {'ENTRANCE_EXAMS': True}) def setUp(self): diff --git a/lms/djangoapps/courseware/tests/test_favicon.py b/lms/djangoapps/courseware/tests/test_favicon.py index 9450f2fe70..9167c4842d 100644 --- a/lms/djangoapps/courseware/tests/test_favicon.py +++ b/lms/djangoapps/courseware/tests/test_favicon.py @@ -8,7 +8,6 @@ class FaviconTestCase(UrlResetMixin, TestCase): """ Tests of the courseware favicon. """ - shard = 1 def test_favicon_redirect(self): resp = self.client.get("/favicon.ico") diff --git a/lms/djangoapps/courseware/tests/test_field_overrides.py b/lms/djangoapps/courseware/tests/test_field_overrides.py index 0478dd830c..a10e573acb 100644 --- a/lms/djangoapps/courseware/tests/test_field_overrides.py +++ b/lms/djangoapps/courseware/tests/test_field_overrides.py @@ -7,7 +7,6 @@ import unittest from django.test.utils import override_settings from xblock.field_data import DictFieldData -from openedx.core.lib.tests import attr from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory @@ -60,7 +59,6 @@ class OverrideFieldBase(SharedModuleStoreTestCase): cls.course = CourseFactory.create(enable_ccx=True) -@attr(shard=1) @override_settings(FIELD_OVERRIDE_PROVIDERS=( 'courseware.tests.test_field_overrides.TestOverrideProvider',)) class OverrideFieldDataTests(OverrideFieldBase): @@ -132,7 +130,6 @@ class OverrideFieldDataTests(OverrideFieldBase): self.assertIsInstance(data, DictFieldData) -@attr(shard=1) @override_settings( MODULESTORE_FIELD_OVERRIDE_PROVIDERS=['courseware.tests.test_field_overrides.TestOverrideProvider'] ) @@ -149,7 +146,6 @@ class OverrideModulestoreFieldDataTests(FieldOverrideTestMixin, OverrideFieldDat self.assertIsInstance(data, DictFieldData) -@attr(shard=1) class ResolveDottedTests(unittest.TestCase): """ Tests for `resolve_dotted`. diff --git a/lms/djangoapps/courseware/tests/test_footer.py b/lms/djangoapps/courseware/tests/test_footer.py index 2b76db6d99..bba1e60fa4 100644 --- a/lms/djangoapps/courseware/tests/test_footer.py +++ b/lms/djangoapps/courseware/tests/test_footer.py @@ -17,7 +17,6 @@ class TestFooter(TestCase): """ Tests for edx and OpenEdX footer """ - shard = 1 SOCIAL_MEDIA_NAMES = [ "facebook", diff --git a/lms/djangoapps/courseware/tests/test_group_access.py b/lms/djangoapps/courseware/tests/test_group_access.py index c22e565683..7f89df7817 100644 --- a/lms/djangoapps/courseware/tests/test_group_access.py +++ b/lms/djangoapps/courseware/tests/test_group_access.py @@ -55,7 +55,6 @@ class GroupAccessTestCase(ModuleStoreTestCase): Tests to ensure that has_access() correctly enforces the visibility restrictions specified in the `group_access` field of XBlocks. """ - shard = 7 def set_user_group(self, user, partition, group): """ diff --git a/lms/djangoapps/courseware/tests/test_i18n.py b/lms/djangoapps/courseware/tests/test_i18n.py index 572eee5f0f..bef2751acd 100644 --- a/lms/djangoapps/courseware/tests/test_i18n.py +++ b/lms/djangoapps/courseware/tests/test_i18n.py @@ -14,7 +14,6 @@ from django.utils import translation from openedx.core.djangoapps.dark_lang.models import DarkLangConfig from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from openedx.core.lib.tests import attr from student.tests.factories import UserFactory @@ -70,7 +69,6 @@ class BaseI18nTestCase(CacheIsolationTestCase): self.client.login(username=self.user.username, password=self.pwd) -@attr(shard=1) class I18nTestCase(BaseI18nTestCase): """ Tests for i18n @@ -104,7 +102,6 @@ class I18nTestCase(BaseI18nTestCase): self.assert_tag_has_attr(response.content, "body", "class", "rtl") -@attr(shard=1) class I18nRegressionTests(BaseI18nTestCase): """ Tests for i18n @@ -159,7 +156,6 @@ class I18nRegressionTests(BaseI18nTestCase): self.assert_tag_has_attr(response.content, "html", "lang", site_lang) -@attr(shard=1) class I18nLangPrefTests(BaseI18nTestCase): """ Regression tests of language presented to the user, when they diff --git a/lms/djangoapps/courseware/tests/test_lti_integration.py b/lms/djangoapps/courseware/tests/test_lti_integration.py index a6a7e4ba37..d7fe58f08b 100644 --- a/lms/djangoapps/courseware/tests/test_lti_integration.py +++ b/lms/djangoapps/courseware/tests/test_lti_integration.py @@ -27,7 +27,6 @@ class TestLTI(BaseTestXmodule): of `oauthlib` library. """ CATEGORY = "lti" - shard = 1 def setUp(self): """ @@ -131,7 +130,6 @@ class TestLTIModuleListing(SharedModuleStoreTestCase): # arbitrary constant COURSE_SLUG = "100" COURSE_NAME = "test_course" - shard = 1 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/courseware/tests/test_masquerade.py b/lms/djangoapps/courseware/tests/test_masquerade.py index bbff157327..c4527512a0 100644 --- a/lms/djangoapps/courseware/tests/test_masquerade.py +++ b/lms/djangoapps/courseware/tests/test_masquerade.py @@ -22,7 +22,6 @@ from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration from openedx.core.djangoapps.user_api.preferences.api import get_user_preference, set_user_preference from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag -from openedx.core.lib.tests import attr from openedx.features.course_experience import UNIFIED_COURSE_TAB_FLAG from student.models import CourseEnrollment from student.tests.factories import UserFactory @@ -166,7 +165,6 @@ class MasqueradeTestCase(SharedModuleStoreTestCase, LoginEnrollmentTestCase): self.assertEqual(200, masquerade_as_group_member(self.test_user, self.course, partition_id, group_id)) -@attr(shard=1) class NormalStudentVisibilityTest(MasqueradeTestCase): """ Verify the course displays as expected for a "normal" student (to ensure test setup is correct). @@ -221,7 +219,6 @@ class StaffMasqueradeTestCase(MasqueradeTestCase): return response -@attr(shard=1) class TestStaffMasqueradeAsStudent(StaffMasqueradeTestCase): """ Check for staff being able to masquerade as student. @@ -260,7 +257,6 @@ class TestStaffMasqueradeAsStudent(StaffMasqueradeTestCase): @ddt.ddt -@attr(shard=1) class TestStaffMasqueradeAsSpecificStudent(StaffMasqueradeTestCase, ProblemSubmissionTestMixin): """ Check for staff being able to masquerade as a specific student. @@ -455,7 +451,6 @@ class TestStaffMasqueradeAsSpecificStudent(StaffMasqueradeTestCase, ProblemSubmi self.assertIn("2 of 2 possible points", masquerade_progress) -@attr(shard=1) class TestGetMasqueradingGroupId(StaffMasqueradeTestCase): """ Check for staff being able to masquerade as belonging to a group. diff --git a/lms/djangoapps/courseware/tests/test_microsites.py b/lms/djangoapps/courseware/tests/test_microsites.py index 89b543d9ab..6435a04a35 100644 --- a/lms/djangoapps/courseware/tests/test_microsites.py +++ b/lms/djangoapps/courseware/tests/test_microsites.py @@ -21,7 +21,6 @@ class TestSites(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ This is testing of the Site Configuration feature """ - shard = 1 STUDENT_INFO = [('view@test.com', 'foo'), ('view2@test.com', 'foo')] ENABLED_SIGNALS = ['course_published'] diff --git a/lms/djangoapps/courseware/tests/test_middleware.py b/lms/djangoapps/courseware/tests/test_middleware.py index a83996bae9..07c7c5de1a 100644 --- a/lms/djangoapps/courseware/tests/test_middleware.py +++ b/lms/djangoapps/courseware/tests/test_middleware.py @@ -13,7 +13,6 @@ from xmodule.modulestore.tests.factories import CourseFactory class CoursewareMiddlewareTestCase(SharedModuleStoreTestCase): """Tests that courseware middleware is correctly redirected""" - shard = 1 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index d5a769c984..38b3a70f04 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -26,7 +26,6 @@ from courseware.tests.factories import ( course_id, location ) -from openedx.core.lib.tests import attr from student.tests.factories import UserFactory @@ -60,7 +59,6 @@ class StudentModuleFactory(cmfStudentModuleFactory): course_id = course_id -@attr(shard=1) class TestInvalidScopes(TestCase): def setUp(self): super(TestInvalidScopes, self).setUp() @@ -81,7 +79,6 @@ class TestInvalidScopes(TestCase): self.assertRaises(InvalidScopeError, self.kvs.set_many, {key: 'value'}) -@attr(shard=1) class OtherUserFailureTestMixin(object): """ Mixin class to add test cases for failures when a user trying to use the kvs is not @@ -106,7 +103,6 @@ class OtherUserFailureTestMixin(object): self.kvs.set(self.other_key_factory(self.existing_field_name), "new_value") -@attr(shard=1) class TestStudentModuleStorage(OtherUserFailureTestMixin, TestCase): """Tests for user_state storage via StudentModule""" other_key_factory = partial(DjangoKeyValueStore.Key, Scope.user_state, 2, location('usage_id')) # user_id=2, not 1 @@ -235,7 +231,6 @@ class TestStudentModuleStorage(OtherUserFailureTestMixin, TestCase): self.assertEquals(exception_context.exception.saved_field_names, []) -@attr(shard=1) class TestMissingStudentModule(TestCase): # Tell Django to clean out all databases, not just default multi_db = True @@ -291,11 +286,9 @@ class TestMissingStudentModule(TestCase): self.assertFalse(self.kvs.has(user_state_key('a_field'))) -@attr(shard=1) class StorageTestBase(object): """ A base class for that gets subclassed when testing each of the scopes. - """ # Disable pylint warnings that arise because of the way the child classes call # this base class -- pylint's static analysis can't keep up with it. diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 3044a9e326..057ced7f3a 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -61,7 +61,6 @@ from openedx.core.djangoapps.credit.api import set_credit_requirement_status, se from openedx.core.djangoapps.credit.models import CreditCourse from openedx.core.lib.courses import course_image_url from openedx.core.lib.gating import api as gating_api -from openedx.core.lib.tests import attr from openedx.core.lib.url_utils import quote_slashes from student.models import anonymous_id_for_user from verify_student.tests.factories import SoftwareSecurePhotoVerificationFactory @@ -170,7 +169,6 @@ class XBlockWithoutCompletionAPI(XBlock): return self.runtime.publish(self, 'progress', {}) -@attr(shard=1) @ddt.ddt class ModuleRenderTestCase(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ @@ -505,7 +503,6 @@ class ModuleRenderTestCase(SharedModuleStoreTestCase, LoginEnrollmentTestCase): self.assertEqual(hash_resource(resources), 'a76e27c8e80ca3efd7ce743093aa59e0') -@attr(shard=1) @ddt.ddt class TestHandleXBlockCallback(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ @@ -905,7 +902,6 @@ class TestHandleXBlockCallback(SharedModuleStoreTestCase, LoginEnrollmentTestCas BlockCompletion.objects.get(block_key=block.scope_ids.usage_id) -@attr(shard=1) @ddt.ddt @patch.dict('django.conf.settings.FEATURES', {'ENABLE_XBLOCK_VIEW_ENDPOINT': True}) class TestXBlockView(SharedModuleStoreTestCase, LoginEnrollmentTestCase): @@ -964,7 +960,6 @@ class TestXBlockView(SharedModuleStoreTestCase, LoginEnrollmentTestCase): self.assertEquals(401, response.status_code) -@attr(shard=1) @ddt.ddt class TestTOC(ModuleStoreTestCase): """Check the Table of Contents for a course""" @@ -1070,7 +1065,6 @@ class TestTOC(ModuleStoreTestCase): self.assertEquals(actual['next_of_active_section']['url_name'], 'video_123456789012') -@attr(shard=1) @ddt.ddt @patch.dict('django.conf.settings.FEATURES', {'ENABLE_SPECIAL_EXAMS': True}) class TestProctoringRendering(SharedModuleStoreTestCase): @@ -1408,7 +1402,6 @@ class TestProctoringRendering(SharedModuleStoreTestCase): return None -@attr(shard=1) class TestGatedSubsectionRendering(SharedModuleStoreTestCase, MilestonesTestCaseMixin): @classmethod def setUpClass(cls): @@ -1491,7 +1484,6 @@ class TestGatedSubsectionRendering(SharedModuleStoreTestCase, MilestonesTestCase self.assertIsNone(actual['next_of_active_section']) -@attr(shard=1) @ddt.ddt class TestHtmlModifiers(ModuleStoreTestCase): """ @@ -1655,7 +1647,6 @@ class XBlockWithJsonInitData(XBlock): return frag -@attr(shard=1) @ddt.ddt class JsonInitDataTest(ModuleStoreTestCase): """Tests for JSON data injected into the JS init function.""" @@ -1740,7 +1731,6 @@ class ViewInStudioTest(ModuleStoreTestCase): self.child_module = self._get_module(course.id, child_descriptor, child_descriptor.location) -@attr(shard=1) class MongoViewInStudioTest(ViewInStudioTest): """Test the 'View in Studio' link visibility in a mongo backed course.""" @@ -1769,7 +1759,6 @@ class MongoViewInStudioTest(ViewInStudioTest): self.assertNotIn('View Unit in Studio', result_fragment.content) -@attr(shard=1) class MixedViewInStudioTest(ViewInStudioTest): """Test the 'View in Studio' link visibility in a mixed mongo backed course.""" @@ -1801,7 +1790,6 @@ class DetachedXBlock(XBlock): return frag -@attr(shard=1) @patch.dict('django.conf.settings.FEATURES', {'DISPLAY_DEBUG_INFO_TO_STAFF': True, 'DISPLAY_HISTOGRAMS_TO_STAFF': True}) @patch('courseware.module_render.has_access', Mock(return_value=True, autospec=True)) class TestStaffDebugInfo(SharedModuleStoreTestCase): @@ -1948,7 +1936,6 @@ PER_STUDENT_ANONYMIZED_DESCRIPTORS = sorted(set( ), key=str) -@attr(shard=1) @ddt.ddt class TestAnonymousStudentId(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ @@ -2031,7 +2018,6 @@ class TestAnonymousStudentId(SharedModuleStoreTestCase, LoginEnrollmentTestCase) ) -@attr(shard=1) @patch('track.views.tracker', autospec=True) class TestModuleTrackingContext(SharedModuleStoreTestCase): """ @@ -2150,7 +2136,6 @@ class TestModuleTrackingContext(SharedModuleStoreTestCase): self.assertEqual(module_info['original_usage_version'], unicode(original_usage_version)) -@attr(shard=1) class TestXmoduleRuntimeEvent(TestSubmittingProblems): """ Inherit from TestSubmittingProblems to get functionality that set up a course and problems structure @@ -2220,7 +2205,6 @@ class TestXmoduleRuntimeEvent(TestSubmittingProblems): send_mock.assert_called_with(**expected_signal_kwargs) -@attr(shard=1) class TestRebindModule(TestSubmittingProblems): """ Tests to verify the functionality of rebinding a module. @@ -2297,7 +2281,6 @@ class TestRebindModule(TestSubmittingProblems): self.assertEqual(module.descriptor.scope_ids.user_id, user2.id) -@attr(shard=1) @ddt.ddt class TestEventPublishing(ModuleStoreTestCase, LoginEnrollmentTestCase): """ @@ -2336,7 +2319,6 @@ class TestEventPublishing(ModuleStoreTestCase, LoginEnrollmentTestCase): mock_track_function.return_value.assert_called_once_with(event_type, event) -@attr(shard=1) @ddt.ddt class LMSXBlockServiceBindingTest(SharedModuleStoreTestCase): """ @@ -2427,7 +2409,6 @@ BLOCK_TYPES = ['xblock', 'xmodule'] USER_NUMBERS = range(2) -@attr(shard=1) @ddt.ddt class TestFilteredChildren(SharedModuleStoreTestCase): """ @@ -2582,7 +2563,6 @@ class TestFilteredChildren(SharedModuleStoreTestCase): self.assertEquals(set(child_usage_ids), set(child.scope_ids.usage_id for child in block.get_children())) -@attr(shard=1) @ddt.ddt class TestDisabledXBlockTypes(ModuleStoreTestCase): """ diff --git a/lms/djangoapps/courseware/tests/test_navigation.py b/lms/djangoapps/courseware/tests/test_navigation.py index 9cded433e1..389803bdbf 100644 --- a/lms/djangoapps/courseware/tests/test_navigation.py +++ b/lms/djangoapps/courseware/tests/test_navigation.py @@ -23,7 +23,6 @@ class TestNavigation(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ Check that navigation state is saved properly. """ - shard = 1 STUDENT_INFO = [('view@test.com', 'foo'), ('view2@test.com', 'foo')] @classmethod diff --git a/lms/djangoapps/courseware/tests/test_password_reset.py b/lms/djangoapps/courseware/tests/test_password_reset.py index 7a32e930bb..d83f2fe460 100644 --- a/lms/djangoapps/courseware/tests/test_password_reset.py +++ b/lms/djangoapps/courseware/tests/test_password_reset.py @@ -18,7 +18,6 @@ class TestPasswordReset(LoginEnrollmentTestCase): """ Go through some of the password reset use cases """ - shard = 1 def _setup_user(self, is_staff=False, password=None): """ diff --git a/lms/djangoapps/courseware/tests/test_self_paced_overrides.py b/lms/djangoapps/courseware/tests/test_self_paced_overrides.py index d1d4088e6a..27bc610dbb 100644 --- a/lms/djangoapps/courseware/tests/test_self_paced_overrides.py +++ b/lms/djangoapps/courseware/tests/test_self_paced_overrides.py @@ -23,7 +23,6 @@ class SelfPacedDateOverrideTest(ModuleStoreTestCase): """ Tests for self-paced due date overrides. """ - shard = 4 def setUp(self): self.reset_setting_cache_variables() diff --git a/lms/djangoapps/courseware/tests/test_split_module.py b/lms/djangoapps/courseware/tests/test_split_module.py index 9060486128..3341f5f63a 100644 --- a/lms/djangoapps/courseware/tests/test_split_module.py +++ b/lms/djangoapps/courseware/tests/test_split_module.py @@ -24,7 +24,6 @@ class SplitTestBase(SharedModuleStoreTestCase): ICON_CLASSES = None TOOLTIPS = None VISIBLE_CONTENT = None - shard = 1 @classmethod def setUpClass(cls): @@ -289,7 +288,6 @@ class SplitTestPosition(SharedModuleStoreTestCase): """ Check that we can change positions in a course with partitions defined """ - shard = 1 @classmethod def setUpClass(cls): diff --git a/lms/djangoapps/courseware/tests/test_submitting_problems.py b/lms/djangoapps/courseware/tests/test_submitting_problems.py index 0b0eb1b544..239adcb9b0 100644 --- a/lms/djangoapps/courseware/tests/test_submitting_problems.py +++ b/lms/djangoapps/courseware/tests/test_submitting_problems.py @@ -33,7 +33,6 @@ from lms.djangoapps.grades.tasks import compute_all_grades_for_course from openedx.core.djangoapps.credit.api import get_credit_requirement_status, set_credit_requirements from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider from openedx.core.djangoapps.user_api.tests.factories import UserCourseTagFactory -from openedx.core.lib.tests import attr from openedx.core.lib.url_utils import quote_slashes from student.models import CourseEnrollment, anonymous_id_for_user from submissions import api as submissions_api @@ -335,7 +334,6 @@ class TestCourseGrades(TestSubmittingProblems): self._verify_grade(expected_problem_score=(0.0, 1.0), expected_hw_grade=(0.0, 1.0)) -@attr(shard=9) @ddt.ddt class TestCourseGrader(TestSubmittingProblems): """ @@ -752,7 +750,6 @@ class TestCourseGrader(TestSubmittingProblems): self.assertEqual(req_status[0]["status"], 'satisfied') -@attr(shard=9) class ProblemWithUploadedFilesTest(TestSubmittingProblems): """Tests of problems with uploaded files.""" # Tell Django to clean out all databases, not just default @@ -807,7 +804,6 @@ class ProblemWithUploadedFilesTest(TestSubmittingProblems): self.assertItemsEqual(kwargs['files'].keys(), filenames.split()) -@attr(shard=9) class TestPythonGradedResponse(TestSubmittingProblems): """ Check that we can submit a schematic and custom response, and it answers properly. @@ -1058,7 +1054,6 @@ class TestPythonGradedResponse(TestSubmittingProblems): self._check_ireset(name) -@attr(shard=9) class TestConditionalContent(TestSubmittingProblems): """ Check that conditional content works correctly with grading. diff --git a/lms/djangoapps/courseware/tests/test_tabs.py b/lms/djangoapps/courseware/tests/test_tabs.py index 09ef06ee03..6b7876a435 100644 --- a/lms/djangoapps/courseware/tests/test_tabs.py +++ b/lms/djangoapps/courseware/tests/test_tabs.py @@ -23,7 +23,6 @@ from courseware.tests.helpers import LoginEnrollmentTestCase from courseware.views.views import StaticCourseTabView, get_static_tab_fragment from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag from openedx.core.djangolib.testing.utils import get_mock_request -from openedx.core.lib.tests import attr from openedx.features.course_experience import UNIFIED_COURSE_TAB_FLAG from student.models import CourseEnrollment from student.tests.factories import UserFactory @@ -230,7 +229,6 @@ class TextbooksTestCase(TabTestCase): self.assertEquals(num_textbooks_found, self.num_textbooks) -@attr(shard=1) class StaticTabDateTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): """Test cases for Static Tab Dates.""" @@ -288,7 +286,6 @@ class StaticTabDateTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): self.assertIn("this module is temporarily unavailable", static_tab_content) -@attr(shard=1) class StaticTabDateTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): """ Tests for the static tab dates of an XML course @@ -338,7 +335,6 @@ class StaticTabDateTestCaseXML(LoginEnrollmentTestCase, ModuleStoreTestCase): self.assertIn(self.xml_data, resp.content) -@attr(shard=1) @patch.dict('django.conf.settings.FEATURES', {'ENTRANCE_EXAMS': True}) class EntranceExamsTabsTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, MilestonesTestCaseMixin): """ @@ -447,7 +443,6 @@ class EntranceExamsTabsTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase, Mi self.assertEqual(len(course_tab_list), 4) -@attr(shard=1) class TextBookCourseViewsTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase): """ Validate tab behavior when dealing with textbooks. @@ -573,7 +568,6 @@ class TabListTestCase(TabTestCase): self.all_valid_tab_list = xmodule_tabs.CourseTabList().from_json(self.valid_tabs[1]) -@attr(shard=1) class ValidateTabsTestCase(TabListTestCase): """Test cases for validating tabs.""" @@ -603,7 +597,6 @@ class ValidateTabsTestCase(TabListTestCase): ) -@attr(shard=1) class CourseTabListTestCase(TabListTestCase): """Testing the generator method for iterating through displayable tabs""" @@ -731,7 +724,6 @@ class CourseTabListTestCase(TabListTestCase): self.assertIn('Static Tab Instructors Only', name_list_staff) -@attr(shard=1) class ProgressTestCase(TabTestCase): """Test cases for Progress Tab.""" @@ -761,7 +753,6 @@ class ProgressTestCase(TabTestCase): ) -@attr(shard=1) class StaticTabTestCase(TabTestCase): """Test cases for Static Tab.""" @@ -780,7 +771,6 @@ class StaticTabTestCase(TabTestCase): self.check_get_and_set_method_for_key(tab, 'url_slug') -@attr(shard=1) class CourseInfoTabTestCase(TabTestCase): """Test cases for the course info tab.""" def setUp(self): @@ -809,7 +799,6 @@ class CourseInfoTabTestCase(TabTestCase): self.assertEqual(tab.type, 'course_info') -@attr(shard=1) class DiscussionLinkTestCase(TabTestCase): """Test cases for discussion link tab.""" diff --git a/lms/djangoapps/courseware/tests/test_user_state_client.py b/lms/djangoapps/courseware/tests/test_user_state_client.py index 3b26dda171..3e2b55d5b3 100644 --- a/lms/djangoapps/courseware/tests/test_user_state_client.py +++ b/lms/djangoapps/courseware/tests/test_user_state_client.py @@ -17,7 +17,6 @@ class TestDjangoUserStateClient(UserStateClientTestBase, ModuleStoreTestCase): Tests of the DjangoUserStateClient backend. It reuses all tests from :class:`~UserStateClientTestBase`. """ - shard = 4 __test__ = True # Tell Django to clean out all databases, not just default multi_db = True diff --git a/lms/djangoapps/courseware/tests/test_video_handlers.py b/lms/djangoapps/courseware/tests/test_video_handlers.py index a3f5663dcf..7a7fe288e0 100644 --- a/lms/djangoapps/courseware/tests/test_video_handlers.py +++ b/lms/djangoapps/courseware/tests/test_video_handlers.py @@ -16,7 +16,6 @@ from webob import Request, Response from common.test.utils import normalize_repr from openedx.core.djangoapps.contentserver.caching import del_cached_content -from openedx.core.lib.tests import attr from xmodule.contentstore.content import StaticContent from xmodule.contentstore.django import contentstore from xmodule.exceptions import NotFoundError @@ -131,7 +130,6 @@ def attach_bumper_transcript(item, filename, lang="en"): item.video_bumper["transcripts"][lang] = filename -@attr(shard=1) class TestVideo(BaseTestXmodule): """Integration tests: web client + mongo.""" CATEGORY = "video" @@ -205,7 +203,6 @@ class TestVideo(BaseTestXmodule): super(TestVideo, self).tearDown() -@attr(shard=1) @ddt.ddt class TestTranscriptAvailableTranslationsDispatch(TestVideo): """ @@ -364,7 +361,6 @@ class TestTranscriptAvailableTranslationsDispatch(TestVideo): self.assertEqual(response.status_code, 404) -@attr(shard=1) @ddt.ddt class TestTranscriptAvailableTranslationsBumperDispatch(TestVideo): """ @@ -539,7 +535,6 @@ class TestTranscriptDownloadDispatch(TestVideo): self.assertEqual(response.headers[attribute], value) -@attr(shard=1) @ddt.ddt class TestTranscriptTranslationGetDispatch(TestVideo): """ @@ -821,7 +816,6 @@ class TestTranscriptTranslationGetDispatch(TestVideo): self.assertEqual(response.status_code, 404) -@attr(shard=1) class TestStudioTranscriptTranslationGetDispatch(TestVideo): """ Test Studio video handler that provide translation transcripts. @@ -880,7 +874,6 @@ class TestStudioTranscriptTranslationGetDispatch(TestVideo): self.assertEqual(response.headers["Content-Language"], "zh") -@attr(shard=1) @ddt.ddt class TestStudioTranscriptTranslationPostDispatch(TestVideo): """ @@ -987,7 +980,6 @@ class TestStudioTranscriptTranslationPostDispatch(TestVideo): ) -@attr(shard=1) @ddt.ddt class TestStudioTranscriptTranslationDeleteDispatch(TestVideo): """ @@ -1119,7 +1111,6 @@ class TestStudioTranscriptTranslationDeleteDispatch(TestVideo): self.assertFalse(_check_asset(self.item_descriptor.location, sub_file_name)) -@attr(shard=1) class TestGetTranscript(TestVideo): """ Make sure that `get_transcript` method works correctly diff --git a/lms/djangoapps/courseware/tests/test_video_mongo.py b/lms/djangoapps/courseware/tests/test_video_mongo.py index 5eda564a1b..728d1e7da5 100644 --- a/lms/djangoapps/courseware/tests/test_video_mongo.py +++ b/lms/djangoapps/courseware/tests/test_video_mongo.py @@ -34,7 +34,6 @@ from mock import MagicMock, Mock, patch from path import Path as path from openedx.core.djangolib.testing.utils import CacheIsolationTestCase -from openedx.core.lib.tests import attr from openedx.core.djangoapps.waffle_utils.models import WaffleFlagCourseOverrideModel from openedx.core.djangoapps.video_pipeline.config.waffle import waffle_flags, DEPRECATE_YOUTUBE from waffle.testutils import override_flag @@ -75,7 +74,6 @@ I am overwatch. TRANSCRIPT_FILE_SJSON_DATA = """{\n "start": [10],\n "end": [100],\n "text": ["Hi, welcome to edxval."]\n}""" -@attr(shard=7) class TestVideoYouTube(TestVideo): METADATA = {} @@ -141,7 +139,6 @@ class TestVideoYouTube(TestVideo): ) -@attr(shard=7) class TestVideoNonYouTube(TestVideo): """Integration tests: web client + mongo.""" DATA = """ @@ -224,7 +221,6 @@ class TestVideoNonYouTube(TestVideo): ) -@attr(shard=7) @ddt.ddt class TestGetHtmlMethod(BaseTestXmodule): ''' @@ -1082,7 +1078,6 @@ class TestGetHtmlMethod(BaseTestXmodule): self.assertIn(u'"prioritizeHls": {}'.format(data['result']), context) -@attr(shard=7) @ddt.ddt class TestVideoDescriptorInitialization(BaseTestXmodule): """ @@ -1241,7 +1236,6 @@ class TestVideoDescriptorInitialization(BaseTestXmodule): self.assertEqual(context['transcripts_basic_tab_metadata']['video_url']['value'], video_url) -@attr(shard=7) @ddt.ddt class TestEditorSavedMethod(BaseTestXmodule): """ @@ -1541,7 +1535,6 @@ class TestVideoDescriptorStudentViewJson(CacheIsolationTestCase): self.assertItemsEqual(student_view_response['transcripts'].keys(), expected_transcripts) -@attr(shard=7) @ddt.ddt class VideoDescriptorTest(TestCase, VideoDescriptorTestBase): """ diff --git a/lms/djangoapps/courseware/tests/test_video_xml.py b/lms/djangoapps/courseware/tests/test_video_xml.py index b3fb6d9f4d..8afd4723c0 100644 --- a/lms/djangoapps/courseware/tests/test_video_xml.py +++ b/lms/djangoapps/courseware/tests/test_video_xml.py @@ -41,7 +41,6 @@ class VideoModuleLogicTest(LogicTest): raw_field_data = { 'data': '