assert_has_calls() has different order of specified calls.
if any_order is true then the calls can be in any order,
but they must all appear in mock_calls.

https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
This commit is contained in:
Awais Qureshi
2020-06-25 22:04:48 +05:00
parent 05b98cbba2
commit bbe9d19c01

View File

@@ -619,7 +619,7 @@ class CourseGradingTest(CourseTestCase):
'event_transaction_type': 'edx.grades.grading_policy_changed',
}
) for policy_hash in {grading_policy_1, grading_policy_2, grading_policy_3}
])
], any_order=True)
@mock.patch('track.event_transaction_utils.uuid4')
@mock.patch('models.settings.course_grading.tracker')