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

fix: curate_auth_url func changed to non-async #280

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/mrack/providers/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async def _openstack_gather_responses(self, *calls):

return result

async def _curate_auth_url(self, auth_url):
def _curate_auth_url(self, auth_url):
"""Append OpenStack API version if not present."""
return auth_url if auth_url.endswith("/v3") else auth_url + "/v3"

Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,7 @@ async def test_create_session_from_clouds_yaml(
("http://example.com/openstack/v3", "http://example.com/openstack/v3"),
],
)
@pytest.mark.asyncio
async def test_curate_auth_url(self, input_auth_url, expected_auth_url):
def test_curate_auth_url(self, input_auth_url, expected_auth_url):
provider = OpenStackProvider()
result_auth_url = await provider._curate_auth_url(input_auth_url)
result_auth_url = provider._curate_auth_url(input_auth_url)
assert result_auth_url == expected_auth_url