String formatting improvements for tests (2) (#33666)
This commit is contained in:
1 parent
906385172a
commit
d7e9959442
19 files changed
+65
-76
No files matched your search
@@ -25,7 +25,7 @@ async def test_forward_request(hassio_client, aioclient_mock):
|
||||
)
|
||||
async def test_auth_required_forward_request(hassio_noauth_client, build_type):
|
||||
"""Test auth required for normal request."""
|
||||
resp = await hassio_noauth_client.post("/api/hassio/{}".format(build_type))
|
||||
resp = await hassio_noauth_client.post(f"/api/hassio/{build_type}")
|
||||
|
||||
# Check we got right response
|
||||
assert resp.status == 401
|
||||
@@ -46,9 +46,9 @@ async def test_forward_request_no_auth_for_panel(
|
||||
hassio_client, build_type, aioclient_mock
|
||||
):
|
||||
"""Test no auth needed for ."""
|
||||
aioclient_mock.get("http://127.0.0.1/{}".format(build_type), text="response")
|
||||
aioclient_mock.get(f"http://127.0.0.1/{build_type}", text="response")
|
||||
|
||||
resp = await hassio_client.get("/api/hassio/{}".format(build_type))
|
||||
resp = await hassio_client.get(f"/api/hassio/{build_type}")
|
||||
|
||||
# Check we got right response
|
||||
assert resp.status == 200
|
||||
|
||||
Reference in new issue
Block a user