@@ -84,7 +84,7 @@ class TestVideoYouTube(TestVideo): # lint-amnesty, pylint: disable=missing-clas
8484 @patch ('xblock.utils.resources.ResourceLoader.render_django_template' , side_effect = mock_render_template )
8585 def test_video_constructor (self , mock_render_django_template ):
8686 """Make sure that all parameters extracted correctly from xml"""
87- context = self .block .student_view (None ). content
87+ self .block .student_view (None )
8888 sources = ['example.mp4' , 'example.webm' ]
8989
9090 expected_context = {
@@ -150,16 +150,16 @@ def test_video_constructor(self, mock_render_django_template):
150150 mock_render_django_template .assert_called_once ()
151151
152152 # Get the actual context that was passed to render_django_template
153- # call_args = mock_render_django_template.call_args
153+ call_args = mock_render_django_template .call_args
154154 # actual_template = call_args[0][0] # First positional arg is template path
155- # actual_context = call_args[0][1] # Second positional arg is context
155+ actual_context = call_args [0 ][1 ] # Second positional arg is context
156156
157157 # # Verify correct template was used
158158 # assert actual_template == 'templates/video.html'
159159
160160 # Verify context matches expected
161161 # Note: i18n_service is passed as kwarg, so we just verify the context dict
162- assert get_context_dict_from_string ( context ) == expected_context
162+ assert actual_context == expected_context
163163
164164
165165class TestVideoNonYouTube (TestVideo ): # pylint: disable=test-inherits-tests
0 commit comments