@@ -1,4 +1,4 @@
|
||||
"""
|
||||
""" # lint-amnesty, pylint: disable=django-not-configured
|
||||
This is the root package for Open edX. The intent is that all importable code
|
||||
from Open edX will eventually live here, including the code in the lms, cms,
|
||||
and common directories.
|
||||
|
||||
@@ -25,7 +25,7 @@ class RemoteContextPlugin(object):
|
||||
def pytest_runtest_call(self, item):
|
||||
self.doit(item, "call")
|
||||
|
||||
def doit(self, item, when):
|
||||
def doit(self, item, when): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
if self.active:
|
||||
for cfg in Env.BOK_CHOY_SERVERS.values():
|
||||
result = requests.post(
|
||||
|
||||
@@ -47,7 +47,7 @@ class ScorableCompletionHandlerTestCase(CompletionSetUpMixin, TestCase):
|
||||
COMPLETION_SWITCH_ENABLED = True
|
||||
|
||||
def setUp(self):
|
||||
super(ScorableCompletionHandlerTestCase, self).setUp()
|
||||
super(ScorableCompletionHandlerTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.block_key = self.context_key.make_usage_key(block_type='problem', block_id='red')
|
||||
|
||||
def call_scorable_block_completion_handler(self, block_key, score_deleted=None):
|
||||
@@ -143,7 +143,7 @@ class DisabledCompletionHandlerTestCase(CompletionSetUpMixin, TestCase):
|
||||
COMPLETION_SWITCH_ENABLED = False
|
||||
|
||||
def setUp(self):
|
||||
super(DisabledCompletionHandlerTestCase, self).setUp()
|
||||
super(DisabledCompletionHandlerTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.block_key = self.context_key.make_usage_key(block_type='problem', block_id='red')
|
||||
|
||||
def test_disabled_handler_does_not_submit_completion(self):
|
||||
|
||||
@@ -59,7 +59,7 @@ class SubmitCompletionTestCase(CompletionSetUpMixin, TestCase):
|
||||
semantics.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(SubmitCompletionTestCase, self).setUp()
|
||||
super(SubmitCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.override_waffle_switch(True)
|
||||
self.set_up_completion()
|
||||
|
||||
@@ -128,7 +128,7 @@ class CompletionDisabledTestCase(CompletionSetUpMixin, TestCase):
|
||||
Tests that completion API is not called when the feature is disabled.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(CompletionDisabledTestCase, self).setUp()
|
||||
super(CompletionDisabledTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
# insert one completion record...
|
||||
self.set_up_completion()
|
||||
# ...then disable the feature.
|
||||
@@ -152,7 +152,7 @@ class SubmitBatchCompletionTestCase(CompletionWaffleTestMixin, TestCase):
|
||||
semantics.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(SubmitBatchCompletionTestCase, self).setUp()
|
||||
super(SubmitBatchCompletionTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.override_waffle_switch(True)
|
||||
|
||||
self.block_key = UsageKey.from_string('block-v1:edx+test+run+type@video+block@doggos')
|
||||
@@ -194,7 +194,7 @@ class BatchCompletionMethodTests(CompletionWaffleTestMixin, TestCase):
|
||||
Tests for the classmethods that retrieve course/block completion data.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(BatchCompletionMethodTests, self).setUp()
|
||||
super(BatchCompletionMethodTests, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.override_waffle_switch(True)
|
||||
|
||||
self.user = UserFactory.create()
|
||||
|
||||
@@ -80,7 +80,7 @@ class CompletionServiceTestCase(CompletionWaffleTestMixin, SharedModuleStoreTest
|
||||
cls.problems = [cls.problem, cls.problem2, cls.problem3, cls.problem4, cls.problem5]
|
||||
|
||||
def setUp(self):
|
||||
super(CompletionServiceTestCase, self).setUp()
|
||||
super(CompletionServiceTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.override_waffle_switch(True)
|
||||
self.user = UserFactory.create()
|
||||
self.other_user = UserFactory.create()
|
||||
|
||||
@@ -38,7 +38,7 @@ class CompletionBatchTestCase(CompletionWaffleTestMixin, ModuleStoreTestCase):
|
||||
"""
|
||||
Create the test data.
|
||||
"""
|
||||
super(CompletionBatchTestCase, self).setUp()
|
||||
super(CompletionBatchTestCase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.url = reverse('completion:v1:completion-batch')
|
||||
|
||||
# Enable the waffle flag for all tests
|
||||
|
||||
@@ -4,11 +4,11 @@ Required in Django 1.9+ due to imports of models in stock Django apps.
|
||||
"""
|
||||
|
||||
|
||||
import sys
|
||||
import sys # lint-amnesty, pylint: disable=unused-import
|
||||
import tempfile
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from path import Path
|
||||
from path import Path # lint-amnesty, pylint: disable=unused-import
|
||||
|
||||
ALL_LANGUAGES = []
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
super(TestCrowdsourceHinter, self).setUp()
|
||||
super(TestCrowdsourceHinter, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
for idx, student in enumerate(self.STUDENTS):
|
||||
username = "u{}".format(idx)
|
||||
self.create_account(username, student['email'], student['password'])
|
||||
|
||||
@@ -22,7 +22,7 @@ class DuplicateXBlockTest(Exception):
|
||||
effect deployed XBlocks. See discussion at:
|
||||
https://github.com/edx/edx-platform/pull/11032#discussion_r48097392).
|
||||
'''
|
||||
pass
|
||||
pass # lint-amnesty, pylint: disable=unnecessary-pass
|
||||
|
||||
|
||||
class InvalidTestName(Exception):
|
||||
@@ -33,7 +33,7 @@ class InvalidTestName(Exception):
|
||||
`DoneXBlock` instead of `TestDone`), or otherwise made an error, you
|
||||
will see this exception.
|
||||
'''
|
||||
pass
|
||||
pass # lint-amnesty, pylint: disable=unnecessary-pass
|
||||
|
||||
xblock_loaded = False # pylint: disable=invalid-name
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
super(TestRecommender, self).setUp()
|
||||
super(TestRecommender, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
for idx, student in enumerate(self.STUDENTS):
|
||||
username = "u{}".format(idx)
|
||||
self.create_account(username, student['email'], student['password'])
|
||||
@@ -228,7 +228,7 @@ class TestRecommenderCreateFromEmpty(TestRecommender):
|
||||
class TestRecommenderResourceBase(TestRecommender):
|
||||
"""Base helper class for tests with resources."""
|
||||
def setUp(self):
|
||||
super(TestRecommenderResourceBase, self).setUp()
|
||||
super(TestRecommenderResourceBase, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.resource_id = self.resource_urls[0]
|
||||
self.resource_id_second = self.resource_urls[1]
|
||||
self.non_existing_resource_id = 'An non-existing id'
|
||||
@@ -634,7 +634,7 @@ class TestRecommenderFileUploading(TestRecommender):
|
||||
Check whether we can handle file uploading correctly
|
||||
"""
|
||||
def setUp(self):
|
||||
super(TestRecommenderFileUploading, self).setUp()
|
||||
super(TestRecommenderFileUploading, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
self.initial_configuration = {
|
||||
'flagged_accum_resources': {},
|
||||
'endorsed_recommendation_reasons': [],
|
||||
|
||||
@@ -101,7 +101,7 @@ class XBlockEventTestMixin(object):
|
||||
passed into it.
|
||||
|
||||
"""
|
||||
super(XBlockEventTestMixin, self).setUp()
|
||||
super(XBlockEventTestMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
saved_init = lms.djangoapps.lms_xblock.runtime.LmsModuleSystem.__init__
|
||||
|
||||
def patched_init(runtime_self, **kwargs):
|
||||
@@ -190,7 +190,7 @@ class GradePublishTestMixin(object):
|
||||
'''
|
||||
Hot-patch the grading emission system to capture grading events.
|
||||
'''
|
||||
super(GradePublishTestMixin, self).setUp()
|
||||
super(GradePublishTestMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
|
||||
def capture_score(user_id, usage_key, score, max_score):
|
||||
'''
|
||||
@@ -305,7 +305,7 @@ class XBlockStudentTestCaseMixin(object):
|
||||
users, so we exercise more corner cases, but we could
|
||||
standardize if this is more hassle than it's worth.
|
||||
"""
|
||||
super(XBlockStudentTestCaseMixin, self).setUp()
|
||||
super(XBlockStudentTestCaseMixin, self).setUp() # lint-amnesty, pylint: disable=super-with-arguments
|
||||
for idx, student in enumerate(self.student_list):
|
||||
username = "u{}".format(idx)
|
||||
self._enroll_user(username, student['email'], student['password'])
|
||||
|
||||
Reference in New Issue
Block a user