1111from organizations .models import Organization
1212
1313from cms .djangoapps .contentstore .helpers import StaticFileNotices
14- from cms .lib .xblock .upstream_sync import BadUpstream , UpstreamLink
14+ from cms .lib .xblock .upstream_sync import BadUpstream , ComponentUpstreamSyncManager , UpstreamLink
1515from cms .djangoapps .contentstore .tests .utils import CourseTestCase
1616from opaque_keys .edx .keys import UsageKey
1717from common .djangoapps .student .tests .factories import UserFactory
@@ -235,7 +235,7 @@ def call_api(self, usage_key_string, sync: str | None = None):
235235 content_type = "application/json" ,
236236 )
237237
238- @patch .object (downstreams_views , "fetch_customizable_fields " )
238+ @patch .object (ComponentUpstreamSyncManager , "update_customizable_fields " )
239239 @patch .object (downstreams_views , "sync_from_upstream" )
240240 @patch .object (UpstreamLink , "get_for_block" , _get_upstream_link_good_and_syncable )
241241 def test_200_with_sync (self , mock_sync , mock_fetch ):
@@ -250,7 +250,7 @@ def test_200_with_sync(self, mock_sync, mock_fetch):
250250 assert mock_fetch .call_count == 0
251251 assert video_after .upstream == self .video_lib_id
252252
253- @patch .object (downstreams_views , "fetch_customizable_fields " )
253+ @patch .object (ComponentUpstreamSyncManager , "update_customizable_fields " )
254254 @patch .object (downstreams_views , "sync_from_upstream" )
255255 @patch .object (UpstreamLink , "get_for_block" , _get_upstream_link_good_and_syncable )
256256 def test_200_no_sync (self , mock_sync , mock_fetch ):
@@ -265,7 +265,11 @@ def test_200_no_sync(self, mock_sync, mock_fetch):
265265 assert mock_fetch .call_count == 1
266266 assert video_after .upstream == self .video_lib_id
267267
268- @patch .object (downstreams_views , "fetch_customizable_fields" , side_effect = BadUpstream (MOCK_UPSTREAM_ERROR ))
268+ @patch .object (
269+ ComponentUpstreamSyncManager ,
270+ "update_customizable_fields" ,
271+ side_effect = BadUpstream (MOCK_UPSTREAM_ERROR )
272+ )
269273 def test_400 (self , sync : str ):
270274 """
271275 Do we raise a 400 if the provided upstream reference is malformed or not accessible?
0 commit comments