BOM-95
assertItemsEqual with six.assertCountEqual
This commit is contained in:
@@ -803,8 +803,8 @@ class ProblemWithUploadedFilesTest(TestSubmittingProblems):
|
||||
self.assertEqual(name, "post")
|
||||
self.assertEqual(len(args), 1)
|
||||
self.assertTrue(args[0].endswith("/submit/"))
|
||||
self.assertItemsEqual(list(kwargs.keys()), ["files", "data", "timeout"])
|
||||
self.assertItemsEqual(list(kwargs['files'].keys()), filenames.split())
|
||||
six.assertCountEqual(self, list(kwargs.keys()), ["files", "data", "timeout"])
|
||||
six.assertCountEqual(self, list(kwargs['files'].keys()), filenames.split())
|
||||
|
||||
|
||||
class TestPythonGradedResponse(TestSubmittingProblems):
|
||||
|
||||
@@ -366,7 +366,7 @@ class TestTranscriptAvailableTranslationsDispatch(TestVideo):
|
||||
# Make request to available translations dispatch.
|
||||
request = Request.blank('/available_translations')
|
||||
response = self.item.transcript(request=request, dispatch='available_translations')
|
||||
self.assertItemsEqual(json.loads(response.body), result)
|
||||
six.assertCountEqual(self, json.loads(response.body), result)
|
||||
|
||||
@patch('xmodule.video_module.transcripts_utils.edxval_api.get_available_transcript_languages')
|
||||
def test_val_available_translations_feature_disabled(self, mock_get_available_transcript_languages):
|
||||
|
||||
@@ -1576,7 +1576,7 @@ class TestVideoBlockStudentViewJson(BaseTestVideoXBlock, CacheIsolationTestCase)
|
||||
self.video.transcripts = transcripts
|
||||
self.video.sub = english_sub
|
||||
student_view_response = self.get_result()
|
||||
self.assertItemsEqual(list(student_view_response['transcripts'].keys()), expected_transcripts)
|
||||
six.assertCountEqual(self, list(student_view_response['transcripts'].keys()), expected_transcripts)
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
|
||||
Reference in New Issue
Block a user