@@ -20,7 +20,7 @@ async def test_developer_plus_can_create_run_of_transfer_his_group(
2020) -> None :
2121 # Arrange
2222 user = group_transfer .owner_group .get_member_of_role (role_developer_plus )
23- mock_send_task = mocker .patch ("syncmaster.worker.celery.send_task" )
23+ mock_send_task = mocker .patch ("syncmaster.worker.celery.app. send_task" )
2424 mock_to_thread = mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
2525
2626 run = (
@@ -73,7 +73,7 @@ async def test_groupless_user_cannot_create_run(
7373 mocker ,
7474) -> None :
7575 # Arrange
76- mocker .patch ("syncmaster.worker.celery.send_task" )
76+ mocker .patch ("syncmaster.worker.celery.app. send_task" )
7777 mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
7878
7979 # Act
@@ -103,7 +103,7 @@ async def test_group_member_cannot_create_run_of_other_group_transfer(
103103 role_guest_plus : UserTestRoles ,
104104):
105105 # Arrange
106- mocker .patch ("syncmaster.worker.celery.send_task" )
106+ mocker .patch ("syncmaster.worker.celery.app. send_task" )
107107 mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
108108 user = group .get_member_of_role (role_guest_plus )
109109
@@ -139,7 +139,7 @@ async def test_superuser_can_create_run(
139139 mocker ,
140140) -> None :
141141 # Arrange
142- mock_send_task = mocker .patch ("syncmaster.worker.celery.send_task" )
142+ mock_send_task = mocker .patch ("syncmaster.worker.celery.app. send_task" )
143143 mock_to_thread = mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
144144
145145 # Act
@@ -183,7 +183,7 @@ async def test_unauthorized_user_cannot_create_run(
183183 mocker ,
184184) -> None :
185185 # Arrange
186- mocker .patch ("syncmaster.worker.celery.send_task" )
186+ mocker .patch ("syncmaster.worker.celery.app. send_task" )
187187 mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
188188
189189 # Act
@@ -212,7 +212,7 @@ async def test_group_member_cannot_create_run_of_unknown_transfer_error(
212212) -> None :
213213 # Arrange
214214 user = group_transfer .owner_group .get_member_of_role (role_guest_plus )
215- mocker .patch ("syncmaster.worker.celery.send_task" )
215+ mocker .patch ("syncmaster.worker.celery.app. send_task" )
216216 mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
217217
218218 # Act
@@ -240,7 +240,7 @@ async def test_superuser_cannot_create_run_of_unknown_transfer_error(
240240 mocker ,
241241) -> None :
242242 # Arrange
243- mocker .patch ("syncmaster.worker.celery.send_task" )
243+ mocker .patch ("syncmaster.worker.celery.app. send_task" )
244244 mocker .patch ("asyncio.to_thread" , new_callable = AsyncMock )
245245
246246 # Act
0 commit comments