File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -390,18 +390,17 @@ async def test_post_xml_decorator_is_applied(mock_etree_to_string: MagicMock) ->
390
390
mock_envelope = Mock ()
391
391
mock_envelope .tag = "TestEnvelope"
392
392
393
- with patch ("onvif.zeep_aiohttp.etree_to_string" , return_value = b"<test/>" ):
394
- # Set up to fail twice (max retries)
395
- mock_session .post = AsyncMock (
396
- side_effect = aiohttp .ServerDisconnectedError ("Server disconnected" )
397
- )
393
+ # Set up to fail twice (max retries)
394
+ mock_session .post = AsyncMock (
395
+ side_effect = aiohttp .ServerDisconnectedError ("Server disconnected" )
396
+ )
398
397
399
- # Should raise after 2 attempts
400
- with pytest .raises (aiohttp .ServerDisconnectedError ):
401
- await transport .post_xml ("http://example.com/onvif" , mock_envelope , {})
398
+ # Should raise after 2 attempts
399
+ with pytest .raises (aiohttp .ServerDisconnectedError ):
400
+ await transport .post_xml ("http://example.com/onvif" , mock_envelope , {})
402
401
403
- # Verify it was called exactly twice (2 attempts as configured)
404
- assert mock_session .post .call_count == 2
402
+ # Verify it was called exactly twice (2 attempts as configured)
403
+ assert mock_session .post .call_count == 2
405
404
406
405
407
406
@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments