From 93d4af35bd8659ae4fee7758f6b027f76b00f6b5 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 17 Sep 2018 17:01:11 -0400 Subject: [PATCH] No need for superstitious kwargs --- lms/djangoapps/badges/api/tests.py | 4 ++-- lms/djangoapps/badges/events/tests/test_course_complete.py | 2 +- lms/djangoapps/badges/events/tests/test_course_meta.py | 2 +- lms/djangoapps/course_blocks/transformers/tests/helpers.py | 4 ++-- .../course_blocks/transformers/tests/test_start_date.py | 4 ++-- lms/djangoapps/mobile_api/users/tests.py | 2 +- lms/djangoapps/shoppingcart/tests/test_views.py | 2 +- openedx/core/djangoapps/credit/tests/test_api.py | 2 +- openedx/core/djangoapps/credit/tests/test_services.py | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lms/djangoapps/badges/api/tests.py b/lms/djangoapps/badges/api/tests.py index d34a4cf090..35c23bab3d 100644 --- a/lms/djangoapps/badges/api/tests.py +++ b/lms/djangoapps/badges/api/tests.py @@ -22,8 +22,8 @@ class UserAssertionTestCase(UrlResetMixin, ModuleStoreTestCase, ApiTestCase): Mixin for badge API tests. """ - def setUp(self, *args, **kwargs): - super(UserAssertionTestCase, self).setUp(*args, **kwargs) + def setUp(self): + super(UserAssertionTestCase, self).setUp() self.course = CourseFactory.create() self.user = UserFactory.create() # Password defined by factory. diff --git a/lms/djangoapps/badges/events/tests/test_course_complete.py b/lms/djangoapps/badges/events/tests/test_course_complete.py index 8aa0b0168f..2897a61b5c 100644 --- a/lms/djangoapps/badges/events/tests/test_course_complete.py +++ b/lms/djangoapps/badges/events/tests/test_course_complete.py @@ -15,7 +15,7 @@ class CourseCompleteTestCase(ModuleStoreTestCase): """ shard = 4 - def setUp(self, **kwargs): + def setUp(self): super(CourseCompleteTestCase, self).setUp() # Need key to be deterministic to test slugs. self.course = CourseFactory.create( diff --git a/lms/djangoapps/badges/events/tests/test_course_meta.py b/lms/djangoapps/badges/events/tests/test_course_meta.py index d67e70f4f8..f056e9d0e1 100644 --- a/lms/djangoapps/badges/events/tests/test_course_meta.py +++ b/lms/djangoapps/badges/events/tests/test_course_meta.py @@ -74,7 +74,7 @@ class CourseCompletionBadgeTest(ModuleStoreTestCase): """ shard = 4 - def setUp(self, **kwargs): + def setUp(self): super(CourseCompletionBadgeTest, self).setUp() self.badge_classes = [ RandomBadgeClassFactory( diff --git a/lms/djangoapps/course_blocks/transformers/tests/helpers.py b/lms/djangoapps/course_blocks/transformers/tests/helpers.py index 4216ed20cb..3024fec2fc 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/helpers.py +++ b/lms/djangoapps/course_blocks/transformers/tests/helpers.py @@ -216,8 +216,8 @@ class BlockParentsMapTestCase(TransformerRegistryTestMixin, ModuleStoreTestCase) # children. parents_map = [[], [0], [0], [1], [1], [2], [2, 4]] - def setUp(self, **kwargs): - super(BlockParentsMapTestCase, self).setUp(**kwargs) + def setUp(self): + super(BlockParentsMapTestCase, self).setUp() # create the course self.course = CourseFactory.create() 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 5ff94031e3..4fe921b200 100644 --- a/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py +++ b/lms/djangoapps/course_blocks/transformers/tests/test_start_date.py @@ -47,8 +47,8 @@ class StartDateTransformerTestCase(BlockParentsMapTestCase): else: return DEFAULT_START_DATE - def setUp(self, **kwargs): - super(StartDateTransformerTestCase, self).setUp(**kwargs) + def setUp(self): + super(StartDateTransformerTestCase, self).setUp() self.beta_user = BetaTesterFactory(course_key=self.course.id, username='beta_tester', password=self.password) course = self.get_block(0) course.days_early_for_beta = 33 diff --git a/lms/djangoapps/mobile_api/users/tests.py b/lms/djangoapps/mobile_api/users/tests.py index 87a4ed3da4..17881ef80b 100644 --- a/lms/djangoapps/mobile_api/users/tests.py +++ b/lms/djangoapps/mobile_api/users/tests.py @@ -90,7 +90,7 @@ class TestUserEnrollmentApi(UrlResetMixin, MobileAPITestCase, MobileAuthUserTest } @patch.dict(settings.FEATURES, {"ENABLE_DISCUSSION_SERVICE": True}) - def setUp(self, *args, **kwargs): + def setUp(self): super(TestUserEnrollmentApi, self).setUp() def verify_success(self, response): diff --git a/lms/djangoapps/shoppingcart/tests/test_views.py b/lms/djangoapps/shoppingcart/tests/test_views.py index dd39308e6c..7d478eddde 100644 --- a/lms/djangoapps/shoppingcart/tests/test_views.py +++ b/lms/djangoapps/shoppingcart/tests/test_views.py @@ -1719,7 +1719,7 @@ class RegistrationCodeRedemptionCourseEnrollment(SharedModuleStoreTestCase): cls.course = CourseFactory.create(org='MITx', number='999', display_name='Robot Super Course') cls.course_key = cls.course.id - def setUp(self, **kwargs): + def setUp(self): super(RegistrationCodeRedemptionCourseEnrollment, self).setUp() self.user = UserFactory.create() diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py index 39d9f6c59b..1de1f75aa0 100644 --- a/openedx/core/djangoapps/credit/tests/test_api.py +++ b/openedx/core/djangoapps/credit/tests/test_api.py @@ -155,7 +155,7 @@ class CreditApiTestBase(ModuleStoreTestCase): ] } - def setUp(self, **kwargs): + def setUp(self): super(CreditApiTestBase, self).setUp() self.course = CourseFactory.create(org="edx", course="DemoX", run="Demo_Course") self.course_key = self.course.id diff --git a/openedx/core/djangoapps/credit/tests/test_services.py b/openedx/core/djangoapps/credit/tests/test_services.py index 220bc5a96b..d929b98bb1 100644 --- a/openedx/core/djangoapps/credit/tests/test_services.py +++ b/openedx/core/djangoapps/credit/tests/test_services.py @@ -22,7 +22,7 @@ class CreditServiceTests(ModuleStoreTestCase): """ shard = 2 - def setUp(self, **kwargs): + def setUp(self): super(CreditServiceTests, self).setUp() self.service = CreditService()