From bbe9d19c01e32ad511308e6f8ed1d14c520e9299 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Thu, 25 Jun 2020 22:04:48 +0500 Subject: [PATCH] BOM-1811 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 --- cms/djangoapps/contentstore/tests/test_course_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index b5b9bbe718..457b284cfa 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -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')