Merge pull request #18023 from edx/estute/TE-2427-reshard-lms4

Reshard python unittests
This commit is contained in:
Stu Young
2018-05-03 11:53:32 -04:00
committed by GitHub
244 changed files with 862 additions and 129 deletions

View File

@@ -37,7 +37,7 @@ class BookmarkApiEventTestMixin(object):
self.assertFalse(mock_tracker.called) # pylint: disable=maybe-no-member
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
@skip_unless_lms
@pytest.mark.django111_expected_failure

View File

@@ -225,7 +225,7 @@ class BookmarksTestsBase(ModuleStoreTestCase):
self.assertEqual(bookmark_data['path'], bookmark.path)
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
@skip_unless_lms
class BookmarkModelTests(BookmarksTestsBase):
@@ -417,7 +417,7 @@ class BookmarkModelTests(BookmarksTestsBase):
self.assertEqual(bookmark.path, [])
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
class XBlockCacheModelTest(ModuleStoreTestCase):
"""

View File

@@ -11,7 +11,7 @@ from ..services import BookmarksService
from .test_models import BookmarksTestsBase
@attr(shard=2)
@attr(shard=9)
@skip_unless_lms
@pytest.mark.django111_expected_failure
class BookmarksServiceTests(BookmarksTestsBase):

View File

@@ -12,7 +12,7 @@ from ..tasks import _calculate_course_xblocks_data, _update_xblocks_cache
from .test_models import BookmarksTestsBase
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
@pytest.mark.django111_expected_failure
class XBlockCacheTaskTests(BookmarksTestsBase):

View File

@@ -63,7 +63,7 @@ class BookmarksViewsTestsBase(BookmarksTestsBase, BookmarkApiEventTestMixin):
return response
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
@skip_unless_lms
@pytest.mark.django111_expected_failure
@@ -369,7 +369,7 @@ class BookmarksListViewTests(BookmarksViewsTestsBase):
)
@attr(shard=2)
@attr(shard=9)
@ddt.ddt
@skip_unless_lms
@pytest.mark.django111_expected_failure

View File

@@ -32,6 +32,7 @@ from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
"Can't test schedules if the app isn't installed",
)
class TestSendCourseUpdate(ScheduleUpsellTestMixin, ScheduleSendEmailTestMixin, ModuleStoreTestCase):
shard = 6
__test__ = True
# pylint: disable=protected-access

View File

@@ -16,6 +16,8 @@ from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_un
@skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS,
"Can't test schedules if the app isn't installed")
class TestSendEmailBaseCommand(CacheIsolationTestCase):
shard = 6
def setUp(self):
self.command = SendEmailBaseCommand()
self.site = SiteFactory()

View File

@@ -24,6 +24,7 @@ from openedx.core.djangolib.testing.utils import skip_unless_lms, CacheIsolation
"Can't test schedules if the app isn't installed",
)
class TestSendRecurringNudge(ScheduleUpsellTestMixin, ScheduleSendEmailTestMixin, CacheIsolationTestCase):
shard = 6
__test__ = True
# pylint: disable=protected-access

View File

@@ -31,6 +31,7 @@ LOG = logging.getLogger(__name__)
@skipUnless('openedx.core.djangoapps.schedules.apps.SchedulesConfig' in settings.INSTALLED_APPS,
"Can't test schedules if the app isn't installed")
class TestUpgradeReminder(ScheduleSendEmailTestMixin, CacheIsolationTestCase):
shard = 6
__test__ = True
resolver = resolvers.UpgradeReminderResolver