Commit 1db84e79 by Ben Patterson

Additional shard balancing changes for unit tests.

parent ddbd7f91
...@@ -75,7 +75,7 @@ def my_update_subtask_status(entry_id, current_task_id, new_subtask_status): ...@@ -75,7 +75,7 @@ def my_update_subtask_status(entry_id, current_task_id, new_subtask_status):
update_subtask_status(entry_id, current_task_id, new_subtask_status) update_subtask_status(entry_id, current_task_id, new_subtask_status)
@attr('shard_1') @attr('shard_3')
@patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True)) @patch('bulk_email.models.html_to_text', Mock(return_value='Mocking CourseEmail.text_message', autospec=True))
class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase): class TestBulkEmailInstructorTask(InstructorTaskCourseTestCase):
"""Tests instructor task that send bulk email.""" """Tests instructor task that send bulk email."""
......
...@@ -30,7 +30,7 @@ from ccx_keys.locator import CCXLocator ...@@ -30,7 +30,7 @@ from ccx_keys.locator import CCXLocator
from lms.djangoapps.ccx.tests.factories import CcxFactory from lms.djangoapps.ccx.tests.factories import CcxFactory
@attr('shard_1') @attr('shard_3')
@mock.patch.dict( @mock.patch.dict(
'django.conf.settings.FEATURES', 'django.conf.settings.FEATURES',
{ {
......
...@@ -125,7 +125,6 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase): ...@@ -125,7 +125,6 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase):
self.assertEqual(result['pacing'], expected_pacing) self.assertEqual(result['pacing'], expected_pacing)
@attr('shard_3')
class TestCourseDetailSerializer(TestCourseSerializer): # pylint: disable=test-inherits-tests class TestCourseDetailSerializer(TestCourseSerializer): # pylint: disable=test-inherits-tests
""" """
Test CourseDetailSerializer by rerunning all the tests Test CourseDetailSerializer by rerunning all the tests
......
...@@ -38,7 +38,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase ...@@ -38,7 +38,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
@attr('shard_1') @attr('shard_2')
@patch.dict('django.conf.settings.FEATURES', {'ENTRANCE_EXAMS': True, 'MILESTONES_APP': True}) @patch.dict('django.conf.settings.FEATURES', {'ENTRANCE_EXAMS': True, 'MILESTONES_APP': True})
class EntranceExamTestCases(LoginEnrollmentTestCase, ModuleStoreTestCase, MilestonesTestCaseMixin): class EntranceExamTestCases(LoginEnrollmentTestCase, ModuleStoreTestCase, MilestonesTestCaseMixin):
""" """
......
...@@ -51,7 +51,7 @@ def resolve_attrs(test_method): ...@@ -51,7 +51,7 @@ def resolve_attrs(test_method):
return _wrapper return _wrapper
@attr('shard_1') @attr('shard_2')
@ddt.ddt @ddt.ddt
class GroupAccessTestCase(ModuleStoreTestCase): class GroupAccessTestCase(ModuleStoreTestCase):
""" """
......
...@@ -316,7 +316,7 @@ class TestSubmittingProblems(ModuleStoreTestCase, LoginEnrollmentTestCase, Probl ...@@ -316,7 +316,7 @@ class TestSubmittingProblems(ModuleStoreTestCase, LoginEnrollmentTestCase, Probl
return [s.earned for s in hw_section['scores']] return [s.earned for s in hw_section['scores']]
@attr('shard_1') @attr('shard_3')
class TestCourseGrader(TestSubmittingProblems): class TestCourseGrader(TestSubmittingProblems):
""" """
Suite of tests for the course grader. Suite of tests for the course grader.
......
...@@ -184,7 +184,7 @@ class TestJumpTo(ModuleStoreTestCase): ...@@ -184,7 +184,7 @@ class TestJumpTo(ModuleStoreTestCase):
self.assertEqual(response.status_code, 404) self.assertEqual(response.status_code, 404)
@attr('shard_1') @attr('shard_2')
@ddt.ddt @ddt.ddt
class ViewsTestCase(ModuleStoreTestCase): class ViewsTestCase(ModuleStoreTestCase):
""" """
......
...@@ -50,6 +50,11 @@ from opaque_keys.edx.locator import CourseLocator ...@@ -50,6 +50,11 @@ from opaque_keys.edx.locator import CourseLocator
@attr('shard_3') @attr('shard_3')
@ddt.ddt @ddt.ddt
class OrderTest(ModuleStoreTestCase): class OrderTest(ModuleStoreTestCase):
"""
Test shopping cart orders (e.g., cart contains various items,
order is taken through various pieces of cart state, etc.)
"""
def setUp(self): def setUp(self):
super(OrderTest, self).setUp() super(OrderTest, self).setUp()
......
...@@ -69,6 +69,10 @@ postpay_mock = Mock() ...@@ -69,6 +69,10 @@ postpay_mock = Mock()
@patch.dict('django.conf.settings.FEATURES', {'ENABLE_PAID_COURSE_REGISTRATION': True}) @patch.dict('django.conf.settings.FEATURES', {'ENABLE_PAID_COURSE_REGISTRATION': True})
@ddt.ddt @ddt.ddt
class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin): class ShoppingCartViewsTests(SharedModuleStoreTestCase, XssTestMixin):
"""
Test shopping cart view under various states
"""
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super(ShoppingCartViewsTests, cls).setUpClass() super(ShoppingCartViewsTests, cls).setUpClass()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment