Skip to content

Commit

Permalink
chore: change .format() to f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Oct 1, 2024
1 parent 6c739e6 commit 2a234ab
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,28 @@

def _create_banner(client, data, headers, status_code=None):
"""Send POST request."""
result = client.post(
"/banners/",
headers=headers,
json=data,
)
result = client.post("/banners/", headers=headers, json=data)
assert result.status_code == status_code
return result


def _update_banner(client, id, data, headers, status_code=None):
"""Send PUT request."""
result = client.put(
"/banners/{0}".format(id),
headers=headers,
json=data,
)
result = client.put(f"/banners/{id}", headers=headers, json=data)
assert result.status_code == status_code
return result


def _delete_banner(client, id, headers, status_code=None):
"""Send DELETE request."""
result = client.delete("/banners/{0}".format(id), headers=headers)
result = client.delete(f"/banners/{id}", headers=headers)
assert result.status_code == status_code
return result


def _get_banner(client, id, status_code=None):
"""Send GET request."""
result = client.get("/banners/{0}".format(id))
result = client.get(f"/banners/{id}")
assert result.status_code == status_code
return result

Expand Down

0 comments on commit 2a234ab

Please sign in to comment.