@@ -148,7 +148,7 @@ async def test_execute_returns_query_result(self, async_client, mock_od):
148148 mock_od ._entity_set_from_schema_name = AsyncMock (return_value = "accounts" )
149149
150150 resp = MagicMock ()
151- resp .json = AsyncMock (return_value = {
151+ resp .json = MagicMock (return_value = {
152152 "value" : [{"name" : "Contoso" , "accountid" : "g1" }],
153153 "@Microsoft.Dynamics.CRM.morerecords" : False ,
154154 })
@@ -165,7 +165,7 @@ async def test_execute_pages_yields_pages(self, async_client, mock_od):
165165 mock_od ._entity_set_from_schema_name = AsyncMock (return_value = "accounts" )
166166
167167 resp = MagicMock ()
168- resp .json = AsyncMock (return_value = {
168+ resp .json = MagicMock (return_value = {
169169 "value" : [{"name" : "Contoso" , "accountid" : "g1" }],
170170 "@Microsoft.Dynamics.CRM.morerecords" : False ,
171171 })
@@ -410,13 +410,13 @@ async def test_execute_multi_page_with_cookie(self, async_client, mock_od):
410410 paging_cookie = f'<cookie pagenumber="2" pagingcookie="{ encoded } " istracking="false" />'
411411
412412 page1 = MagicMock ()
413- page1 .json = AsyncMock (return_value = {
413+ page1 .json = MagicMock (return_value = {
414414 "value" : [{"name" : "Contoso" , "accountid" : "g1" }],
415415 "@Microsoft.Dynamics.CRM.morerecords" : True ,
416416 "@Microsoft.Dynamics.CRM.fetchxmlpagingcookie" : paging_cookie ,
417417 })
418418 page2 = MagicMock ()
419- page2 .json = AsyncMock (return_value = {
419+ page2 .json = MagicMock (return_value = {
420420 "value" : [{"name" : "Fabrikam" , "accountid" : "g2" }],
421421 "@Microsoft.Dynamics.CRM.morerecords" : False ,
422422 })
@@ -435,13 +435,13 @@ async def test_execute_multi_page_cookie_parse_error_fallback(self, async_client
435435 mock_od ._entity_set_from_schema_name = AsyncMock (return_value = "accounts" )
436436
437437 page1 = MagicMock ()
438- page1 .json = AsyncMock (return_value = {
438+ page1 .json = MagicMock (return_value = {
439439 "value" : [{"name" : "Contoso" , "accountid" : "g1" }],
440440 "@Microsoft.Dynamics.CRM.morerecords" : True ,
441441 "@Microsoft.Dynamics.CRM.fetchxmlpagingcookie" : "<<<not valid xml>>>" ,
442442 })
443443 page2 = MagicMock ()
444- page2 .json = AsyncMock (return_value = {
444+ page2 .json = MagicMock (return_value = {
445445 "value" : [{"name" : "Fabrikam" , "accountid" : "g2" }],
446446 "@Microsoft.Dynamics.CRM.morerecords" : False ,
447447 })
@@ -461,13 +461,13 @@ async def test_execute_multi_page_no_cookie_simple_paging(self, async_client, mo
461461 mock_od ._entity_set_from_schema_name = AsyncMock (return_value = "accounts" )
462462
463463 page1 = MagicMock ()
464- page1 .json = AsyncMock (return_value = {
464+ page1 .json = MagicMock (return_value = {
465465 "value" : [{"name" : "Contoso" , "accountid" : "g1" }],
466466 "@Microsoft.Dynamics.CRM.morerecords" : True ,
467467 # No fetchxmlpagingcookie key
468468 })
469469 page2 = MagicMock ()
470- page2 .json = AsyncMock (return_value = {
470+ page2 .json = MagicMock (return_value = {
471471 "value" : [{"name" : "Fabrikam" , "accountid" : "g2" }],
472472 "@Microsoft.Dynamics.CRM.morerecords" : False ,
473473 })
@@ -485,7 +485,7 @@ async def test_execute_json_parse_error_yields_empty_page(self, async_client, mo
485485 mock_od ._entity_set_from_schema_name = AsyncMock (return_value = "accounts" )
486486
487487 resp = MagicMock ()
488- resp .json = AsyncMock (side_effect = Exception ("invalid json" ))
488+ resp .json = MagicMock (side_effect = Exception ("invalid json" ))
489489 mock_od ._request = AsyncMock (return_value = resp )
490490
491491 result = await async_client .query .fetchxml (_SIMPLE_FETCHXML ).execute ()
@@ -504,7 +504,7 @@ def _make_page_resp(page_num: int):
504504 encoded = urllib .parse .quote (urllib .parse .quote (inner ))
505505 cookie = f'<cookie pagenumber="{ page_num + 1 } " pagingcookie="{ encoded } " istracking="false" />'
506506 resp = MagicMock ()
507- resp .json = AsyncMock (return_value = {
507+ resp .json = MagicMock (return_value = {
508508 "value" : [{"name" : f"Record{ page_num } " , "accountid" : f"g{ page_num } " }],
509509 "@Microsoft.Dynamics.CRM.morerecords" : True ,
510510 "@Microsoft.Dynamics.CRM.fetchxmlpagingcookie" : cookie ,
0 commit comments