Skip to content
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

Let the transport handles bad urls #12106

Merged
merged 6 commits into from
Jun 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests
lmazuel committed Jun 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit fa39b65908fe533f1be5f275fa72bcb49016325c
6 changes: 6 additions & 0 deletions sdk/core/azure-core/tests/test_pipeline.py
Original file line number Diff line number Diff line change
@@ -204,6 +204,12 @@ def test_format_url_no_base_url(self):
formatted = client.format_url("https://google.com/subpath/{foo}", foo="bar")
assert formatted == "https://google.com/subpath/bar"

def test_format_incorrect_endpoint(self):
# https://github.com/Azure/azure-sdk-for-python/pull/12106
client = PipelineClientBase('{Endpoint}/text/analytics/v3.0')
formatted = client.format_url("foo/bar")
# We don't care about the value, we care it doesn't fail
assert formatted is not None

class TestClientRequest(unittest.TestCase):
def test_request_json(self):