1212from django .urls import reverse
1313from edx_toggles .toggles .testutils import override_waffle_flag
1414from lti_consumer .models import CourseAllowPIISharingInLTIFlag
15- from opaque_keys .edx .keys import CourseKey
1615from rest_framework import status
1716from rest_framework .test import APITestCase
1817
@@ -853,7 +852,7 @@ def tearDown(self):
853852 IsStaffOrCourseTeam .has_permission = self .original_has_permission
854853 super ().tearDown ()
855854
856- @patch ('openedx.core.djangoapps.discussions.views.update_unit_discussion_state_from_discussion_blocks ' )
855+ @patch ('openedx.core.djangoapps.discussions.views.update_discussions_settings_from_course_task ' )
857856 def test_sync_discussion_topics_staff_user (self , mock_update ):
858857 """
859858 Test that staff users can sync discussion topics
@@ -863,14 +862,9 @@ def test_sync_discussion_topics_staff_user(self, mock_update):
863862
864863 self .assertEqual (response .status_code , status .HTTP_200_OK )
865864 self .assertEqual (response .data ['status' ], 'success' )
866- mock_update .assert_called_once_with (
867- course_key = CourseKey .from_string (self .course_key_string ),
868- user_id = self .staff_user .id ,
869- force = True ,
870- async_topics = False
871- )
865+ mock_update .assert_called_once_with (self .course_key_string )
872866
873- @patch ('openedx.core.djangoapps.discussions.views.update_unit_discussion_state_from_discussion_blocks ' )
867+ @patch ('openedx.core.djangoapps.discussions.views.update_discussions_settings_from_course_task ' )
874868 def test_sync_discussion_topics_course_team (self , mock_update ):
875869 """
876870 Test that course team members can sync discussion topics
0 commit comments