Merge pull request #8060 from edx/ned/add-supers

Add super() calls to setUp/tearDown that are missing them
This commit is contained in:
Ned Batchelder
2015-05-15 12:29:14 -04:00
60 changed files with 69 additions and 40 deletions

View File

@@ -13,6 +13,7 @@ class TestCourseTagAPI(TestCase):
Test the user service
"""
def setUp(self):
super(TestCourseTagAPI, self).setUp()
self.user = UserFactory.create()
self.course_id = SlashSeparatedCourseKey('test_org', 'test_course_number', 'test_run')
self.test_key = 'test_key'

View File

@@ -134,6 +134,7 @@ class FormDescriptionTest(TestCase):
class StudentViewShimTest(TestCase):
"Tests of the student view shim."
def setUp(self):
super(StudentViewShimTest, self).setUp()
self.captured_request = None
def test_strip_enrollment_action(self):

View File

@@ -16,6 +16,7 @@ class TagsMiddlewareTest(TestCase):
Test the UserTagsEventContextMiddleware
"""
def setUp(self):
super(TagsMiddlewareTest, self).setUp()
self.middleware = UserTagsEventContextMiddleware()
self.user = UserFactory.create()
self.other_user = UserFactory.create()

View File

@@ -42,13 +42,11 @@ class TestRandomUserPartitionScheme(PartitionTestCase):
'openedx.core.djangoapps.user_api.partition_schemes.course_tag_api', course_tag_api
)
self.user_service_patcher.start()
self.addCleanup(self.user_service_patcher.stop)
# Create a test user
self.user = UserFactory.create()
def tearDown(self):
self.user_service_patcher.stop()
def test_get_group_for_user(self):
# get a group assigned to the user
group1_id = RandomUserPartitionScheme.get_group_for_user(self.MOCK_COURSE_ID, self.user, self.user_partition)