feat!: Remove inheritance-related code from Old Mongo

This commit is contained in:
Sagirov Eugeniy
2022-09-20 13:05:07 +03:00
committed by David Ormsbee
parent 672b1341c4
commit 3f3d0d25d8
19 changed files with 64 additions and 236 deletions

View File

@@ -377,15 +377,13 @@ class TestReportMixin:
"""
csv data may contain numeric values that are converted to strings, and fractional
numbers can be imprecise (e.g. 1 / 6 is sometimes '0.16666666666666666' and other times
'0.166666666667'). This function mutates the provided input (sorry) and returns
a new dictionary that contains only the numerically-valued items from it, rounded
to four decimal places.
'0.166666666667'). This function returns a new dictionary that contains only the
numerically-valued items from it, rounded to four decimal places.
"""
extracted = {}
for key in list(dictionary):
try:
float(dictionary[key])
extracted[key] = round(float(dictionary.pop(key)), 4)
extracted[key] = round(float(dictionary[key]), 4)
except ValueError:
pass
return extracted

View File

@@ -370,7 +370,7 @@ class TestInstructorGradeReport(InstructorGradeReportTestCase):
self._verify_cell_data_for_user(verified_user.username, course.id, 'Certificate Eligible', 'Y', num_rows=2)
@ddt.data(
(ModuleStoreEnum.Type.mongo, 4, 47),
(ModuleStoreEnum.Type.mongo, 6, 47),
(ModuleStoreEnum.Type.split, 2, 48),
)
@ddt.unpack
@@ -1779,8 +1779,7 @@ class TestGradeReport(TestReportMixin, InstructorTaskModuleTestCase):
self.define_option_problem('Unreleased', parent=self.unreleased_section)
@patch.dict(settings.FEATURES, {'DISABLE_START_DATES': False})
@ddt.data(True, False)
def test_grade_report(self, persistent_grades_enabled):
def test_grade_report(self):
self.submit_student_answer(self.student.username, 'Problem1', ['Option 1'])
with patch('lms.djangoapps.instructor_task.tasks_helper.runner._get_current_task'):