-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[pyamqp] os error add #27351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
l0lawrence
merged 14 commits into
Azure:feature/eventhub/pyproto
from
l0lawrence:oserror_catch
Nov 18, 2022
Merged
[pyamqp] os error add #27351
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d698ab3
os error add
l0lawrence e3ff8c4
update except statement
l0lawrence cae8238
test mock of receive_bytes on pipeline
l0lawrence 66b91f9
client os error
l0lawrence d8ab387
mock try 2
l0lawrence 0c56075
pylint
l0lawrence d3474d9
fix patch line
l0lawrence eb27cfb
fixed mock
l0lawrence fe01ffa
newline
l0lawrence d3170f4
fixing spacing
l0lawrence 21c57f2
unused import
l0lawrence d315ef5
Merge branch 'feature/eventhub/pyproto' into oserror_catch
l0lawrence d513fd2
Merge branch 'feature/eventhub/pyproto' of https://github.com/Azure/a…
l0lawrence 66fbb45
fix error mssgs
l0lawrence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
sdk/eventhub/azure-eventhub/tests/pyamqp_tests/unittest/test_websocket_exception.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import pytest | ||
| import asyncio | ||
| from unittest.mock import patch | ||
|
|
||
| import aiohttp | ||
| from azure.eventhub._pyamqp.aio._transport_async import WebSocketTransportAsync | ||
|
|
||
|
|
||
| # class WebsocketException(unittest.TestCase): | ||
| async def test_websocket_aiohttp_exception(): | ||
|
swathipil marked this conversation as resolved.
|
||
| with patch.object(aiohttp.ClientSession,'ws_connect', side_effect=aiohttp.ClientOSError): | ||
| transport = WebSocketTransportAsync(host="my_host") | ||
| with pytest.raises(ConnectionError): | ||
| await transport.connect() | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.