Remove lms pytest shards
This commit is contained in:
@@ -37,7 +37,6 @@ class CommandsTestBase(SharedModuleStoreTestCase):
|
||||
__test__ = False
|
||||
url_name = '2012_Fall'
|
||||
ENABLED_SIGNALS = ['course_published']
|
||||
shard = 1
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
@@ -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('<span class="important-dates-item-text">$10</span>', resp.content)
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
@ddt.ddt
|
||||
class AboutSidebarHTMLTestCase(SharedModuleStoreTestCase):
|
||||
"""
|
||||
@@ -523,7 +515,6 @@ class AboutSidebarHTMLTestCase(SharedModuleStoreTestCase):
|
||||
self.assertNotIn('<section class="about-sidebar-html">', 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):
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -14,7 +14,6 @@ class UserPrefContextProcessorUnitTest(ModuleStoreTestCase):
|
||||
"""
|
||||
Unit test for courseware context_processor
|
||||
"""
|
||||
shard = 4
|
||||
|
||||
def setUp(self):
|
||||
super(UserPrefContextProcessorUnitTest, self).setUp()
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,7 +23,6 @@ from xmodule.modulestore.tests.factories import CourseFactory
|
||||
|
||||
|
||||
class VerifiedUpgradeToolTest(SharedModuleStoreTestCase):
|
||||
shard = 3
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -21,7 +21,6 @@ class ProgressPageCreditRequirementsTest(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Tests for credit requirement display on the progress page.
|
||||
"""
|
||||
shard = 4
|
||||
|
||||
USERNAME = "bob"
|
||||
PASSWORD = "test"
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -8,7 +8,6 @@ class TestDraftModuleStore(TestCase):
|
||||
"""
|
||||
Test the draft modulestore
|
||||
"""
|
||||
shard = 1
|
||||
|
||||
def test_get_items_with_course_items(self):
|
||||
store = modulestore()
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -17,7 +17,6 @@ class TestFooter(TestCase):
|
||||
"""
|
||||
Tests for edx and OpenEdX footer
|
||||
"""
|
||||
shard = 1
|
||||
|
||||
SOCIAL_MEDIA_NAMES = [
|
||||
"facebook",
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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']
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -23,7 +23,6 @@ class SelfPacedDateOverrideTest(ModuleStoreTestCase):
|
||||
"""
|
||||
Tests for self-paced due date overrides.
|
||||
"""
|
||||
shard = 4
|
||||
|
||||
def setUp(self):
|
||||
self.reset_setting_cache_variables()
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -41,7 +41,6 @@ class VideoModuleLogicTest(LogicTest):
|
||||
raw_field_data = {
|
||||
'data': '<video />'
|
||||
}
|
||||
shard = 1
|
||||
|
||||
def test_parse_youtube(self):
|
||||
"""Test parsing old-style Youtube ID strings into a dict."""
|
||||
|
||||
@@ -29,7 +29,6 @@ class TestViewAuth(EnterpriseTestConsentRequired, ModuleStoreTestCase, LoginEnro
|
||||
|
||||
ACCOUNT_INFO = [('view@test.com', 'foo'), ('view2@test.com', 'foo')]
|
||||
ENABLED_SIGNALS = ['course_published']
|
||||
shard = 1
|
||||
|
||||
@staticmethod
|
||||
def _reverse_urls(names, course):
|
||||
@@ -413,7 +412,6 @@ class TestBetatesterAccess(ModuleStoreTestCase, CourseAccessTestMixin):
|
||||
"""
|
||||
Tests for the beta tester feature
|
||||
"""
|
||||
shard = 1
|
||||
|
||||
def setUp(self):
|
||||
super(TestBetatesterAccess, self).setUp()
|
||||
|
||||
@@ -63,7 +63,6 @@ from openedx.core.djangoapps.credit.models import CreditCourse, CreditProvider
|
||||
from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES, override_waffle_flag
|
||||
from openedx.core.djangolib.testing.utils import get_mock_request
|
||||
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 openedx.features.content_type_gating.models import ContentTypeGatingConfig
|
||||
from openedx.features.course_duration_limits.models import CourseDurationLimitConfig
|
||||
@@ -94,7 +93,6 @@ from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory, chec
|
||||
QUERY_COUNT_TABLE_BLACKLIST = WAFFLE_TABLES
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class TestJumpTo(ModuleStoreTestCase):
|
||||
"""
|
||||
Check the jumpto link for a course.
|
||||
@@ -205,7 +203,6 @@ class TestJumpTo(ModuleStoreTestCase):
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class IndexQueryTestCase(ModuleStoreTestCase):
|
||||
"""
|
||||
@@ -249,7 +246,6 @@ class IndexQueryTestCase(ModuleStoreTestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class ViewsTestCase(ModuleStoreTestCase):
|
||||
"""
|
||||
@@ -964,7 +960,6 @@ class ViewsTestCase(ModuleStoreTestCase):
|
||||
self.assertContains(response, test)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
# Patching 'lms.djangoapps.courseware.views.views.get_programs' would be ideal,
|
||||
# but for some unknown reason that patch doesn't seem to be applied.
|
||||
@patch('openedx.core.djangoapps.catalog.utils.cache')
|
||||
@@ -1006,7 +1001,6 @@ class TestProgramMarketingView(SharedModuleStoreTestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
# setting TIME_ZONE_DISPLAYED_FOR_DEADLINES explicitly
|
||||
@override_settings(TIME_ZONE_DISPLAYED_FOR_DEADLINES="UTC")
|
||||
class BaseDueDateTests(ModuleStoreTestCase):
|
||||
@@ -1099,7 +1093,6 @@ class TestProgressDueDate(BaseDueDateTests):
|
||||
|
||||
|
||||
# TODO: LEARNER-71: Delete entire TestAccordionDueDate class
|
||||
@attr(shard=5)
|
||||
class TestAccordionDueDate(BaseDueDateTests):
|
||||
"""
|
||||
Test that the accordion page displays due dates correctly
|
||||
@@ -1139,7 +1132,6 @@ class TestAccordionDueDate(BaseDueDateTests):
|
||||
super(TestAccordionDueDate, self).test_format_none()
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class StartDateTests(ModuleStoreTestCase):
|
||||
"""
|
||||
Test that start dates are properly localized and displayed on the student
|
||||
@@ -1180,7 +1172,6 @@ class StartDateTests(ModuleStoreTestCase):
|
||||
self.assertContains(response, "2013-09-16T07:17:28+0000")
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class ProgressPageBaseTests(ModuleStoreTestCase):
|
||||
"""
|
||||
Base class for progress page tests.
|
||||
@@ -1238,7 +1229,6 @@ class ProgressPageBaseTests(ModuleStoreTestCase):
|
||||
|
||||
|
||||
# pylint: disable=protected-access
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class ProgressPageTests(ProgressPageBaseTests):
|
||||
"""
|
||||
@@ -1867,7 +1857,6 @@ class ProgressPageTests(ProgressPageBaseTests):
|
||||
}
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class ProgressPageShowCorrectnessTests(ProgressPageBaseTests):
|
||||
"""
|
||||
@@ -2147,7 +2136,6 @@ class ProgressPageShowCorrectnessTests(ProgressPageBaseTests):
|
||||
self.assert_progress_page_show_grades(resp, show_correctness, due_date, graded, show_grades, 1, 1, .5)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class VerifyCourseKeyDecoratorTests(TestCase):
|
||||
"""
|
||||
Tests for the ensure_valid_course_key decorator.
|
||||
@@ -2173,7 +2161,6 @@ class VerifyCourseKeyDecoratorTests(TestCase):
|
||||
self.assertFalse(mocked_view.called)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class GenerateUserCertTests(ModuleStoreTestCase):
|
||||
"""
|
||||
Tests for the view function Generated User Certs
|
||||
@@ -2332,7 +2319,6 @@ class ViewCheckerBlock(XBlock):
|
||||
return result
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class TestIndexView(ModuleStoreTestCase):
|
||||
"""
|
||||
@@ -2485,7 +2471,6 @@ class TestIndexView(ModuleStoreTestCase):
|
||||
self.assertIn('xblock-student_view-video', response.content)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class TestIndexViewCompleteOnView(ModuleStoreTestCase, CompletionWaffleTestMixin):
|
||||
"""
|
||||
@@ -2622,7 +2607,6 @@ class TestIndexViewCompleteOnView(ModuleStoreTestCase, CompletionWaffleTestMixin
|
||||
self.assertNotIn('data-mark-completed-on-view-after-delay', response.content)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class TestIndexViewWithVerticalPositions(ModuleStoreTestCase):
|
||||
"""
|
||||
@@ -2689,7 +2673,6 @@ class TestIndexViewWithVerticalPositions(ModuleStoreTestCase):
|
||||
self._assert_correct_position(resp, expected_position)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class TestIndexViewWithGating(ModuleStoreTestCase, MilestonesTestCaseMixin):
|
||||
"""
|
||||
Test the index view for a course with gated content
|
||||
@@ -2741,7 +2724,6 @@ class TestIndexViewWithGating(ModuleStoreTestCase, MilestonesTestCaseMixin):
|
||||
self.assertIn("Content Locked", response.content)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class TestIndexViewWithCourseDurationLimits(ModuleStoreTestCase):
|
||||
"""
|
||||
Test the index view for a course with course duration limits enabled.
|
||||
@@ -2810,7 +2792,6 @@ class TestIndexViewWithCourseDurationLimits(ModuleStoreTestCase):
|
||||
self.assertNotContains(response, bannerText, html=True)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class TestRenderXBlock(RenderXBlockTestMixin, ModuleStoreTestCase, CompletionWaffleTestMixin):
|
||||
"""
|
||||
Tests for the courseware.render_xblock endpoint.
|
||||
@@ -2904,7 +2885,6 @@ class TestRenderXBlockSelfPaced(TestRenderXBlock):
|
||||
return options
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class TestIndexViewCrawlerStudentStateWrites(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Ensure that courseware index requests do not trigger student state writes.
|
||||
@@ -2984,7 +2964,6 @@ class TestIndexViewCrawlerStudentStateWrites(SharedModuleStoreTestCase):
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
class EnterpriseConsentTestCase(EnterpriseTestConsentRequired, ModuleStoreTestCase):
|
||||
"""
|
||||
Ensure that the Enterprise Data Consent redirects are in place only when consent is required.
|
||||
@@ -3014,7 +2993,6 @@ class EnterpriseConsentTestCase(EnterpriseTestConsentRequired, ModuleStoreTestCa
|
||||
self.verify_consent_required(self.client, url)
|
||||
|
||||
|
||||
@attr(shard=5)
|
||||
@ddt.ddt
|
||||
class AccessUtilsTestCase(ModuleStoreTestCase):
|
||||
"""
|
||||
|
||||
@@ -12,7 +12,6 @@ from .helpers import BaseTestXmodule
|
||||
class TestWordCloud(BaseTestXmodule):
|
||||
"""Integration test for word cloud xmodule."""
|
||||
CATEGORY = "word_cloud"
|
||||
shard = 1
|
||||
|
||||
def _get_resource_url(self, item):
|
||||
"""
|
||||
|
||||
@@ -11,14 +11,12 @@ from six import text_type
|
||||
|
||||
from courseware.tests.helpers import LoginEnrollmentTestCase
|
||||
from lms.djangoapps.lms_xblock.field_data import LmsFieldData
|
||||
from openedx.core.lib.tests import attr
|
||||
from xmodule.error_module import ErrorDescriptor
|
||||
from xmodule.modulestore.django import modulestore
|
||||
from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import ToyCourseFactory
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
class ActivateLoginTest(LoginEnrollmentTestCase):
|
||||
"""
|
||||
Test logging in and logging out.
|
||||
@@ -122,7 +120,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
|
||||
self.assertNotIsInstance(descriptor, ErrorDescriptor)
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
class TestMongoCoursesLoad(ModuleStoreTestCase, PageLoaderTestCase):
|
||||
"""
|
||||
Check that all pages in test courses load properly from Mongo.
|
||||
@@ -146,7 +143,6 @@ class TestMongoCoursesLoad(ModuleStoreTestCase, PageLoaderTestCase):
|
||||
self.assertGreater(len(course.textbooks), 0)
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
class TestDraftModuleStore(ModuleStoreTestCase):
|
||||
def test_get_items_with_course_items(self):
|
||||
store = modulestore()
|
||||
@@ -159,7 +155,6 @@ class TestDraftModuleStore(ModuleStoreTestCase):
|
||||
# not allowed to be passed in (i.e. was throwing exception)
|
||||
|
||||
|
||||
@attr(shard=1)
|
||||
class TestLmsFieldData(TestCase):
|
||||
"""
|
||||
Tests of the LmsFieldData class
|
||||
|
||||
Reference in New Issue
Block a user