Skip to content

Commit

Permalink
Merge pull request #261 from ably/fix-line-too-long-flake-warning
Browse files Browse the repository at this point in the history
Fix line too long flake warning
  • Loading branch information
tomkirbygreen authored Mar 10, 2022
2 parents 5300f38 + d7006e2 commit 56cd398
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ably/types/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def __get_rest_hosts(self):
if self.fallback_hosts_use_default:
if environment != Defaults.environment:
warnings.warn(
"It is no longer required to set 'fallback_hosts_use_default', the correct fallback hosts are now "
"inferred from the environment, 'fallback_hosts': {}"
"It is no longer required to set 'fallback_hosts_use_default', the correct fallback hosts "
"are now inferred from the environment, 'fallback_hosts': {}"
.format(','.join(fallback_hosts)), DeprecationWarning
)
else:
Expand Down
7 changes: 4 additions & 3 deletions test/ably/restauth_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ async def setUp(self):
headers = {'Content-Type': 'application/json'}

self.mocked_api = respx.mock(base_url='https://{}'.format(host))
self.request_token_route = self.mocked_api.post("/keys/{}/requestToken".format(key), name="request_token_route")
self.request_token_route = self.mocked_api.post("/keys/{}/requestToken".format(key),
name="request_token_route")
self.request_token_route.return_value = Response(
status_code=200,
headers=headers,
Expand All @@ -605,8 +606,8 @@ async def setUp(self):
'expires': int(time.time() * 1000), # Always expires
}
)
self.publish_message_route = self.mocked_api.post("/channels/{}/messages"
.format(self.channel), name="publish_message_route")
self.publish_message_route = self.mocked_api.post("/channels/{}/messages".format(self.channel),
name="publish_message_route")
self.time_route = self.mocked_api.get("/time", name="time_route")
self.time_route.return_value = Response(
status_code=200,
Expand Down
10 changes: 8 additions & 2 deletions test/ably/resthttp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ async def test_no_host_fallback_nor_retries_if_custom_host(self):
await ably.http.make_request('GET', '/', skip_auth=True)

assert send_mock.call_count == 1
assert request_mock.call_args == mock.call(mock.ANY, custom_url, content=mock.ANY, headers=mock.ANY)
assert request_mock.call_args == mock.call(mock.ANY,
custom_url,
content=mock.ANY,
headers=mock.ANY)
await ably.close()

# RSC15f
Expand Down Expand Up @@ -156,7 +159,10 @@ def raise_ably_exception(*args, **kwargs):
await ably.http.make_request('GET', '/', skip_auth=True)

assert send_mock.call_count == 1
assert request_mock.call_args == mock.call(mock.ANY, default_url, content=mock.ANY, headers=mock.ANY)
assert request_mock.call_args == mock.call(mock.ANY,
default_url,
content=mock.ANY,
headers=mock.ANY)
await ably.close()

async def test_500_errors(self):
Expand Down

0 comments on commit 56cd398

Please sign in to comment.