summaryrefslogtreecommitdiff
path: root/tests/unit/test_gitlab.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-11-01 19:22:18 +0100
committerNejc Habjan <hab.nejc@gmail.com>2021-11-02 07:03:33 +0100
commit30fa865cfe145d172b7061cb2af03837b3d1d312 (patch)
tree414f0a060d4dce56310327e07cbdcf7f41f39fc3 /tests/unit/test_gitlab.py
parentc7fdad42f68927d79e0d1963ade3324370b9d0e2 (diff)
downloadgitlab-refactor/f-strings.tar.gz
refactor: use f-strings for string formattingrefactor/f-strings
Diffstat (limited to 'tests/unit/test_gitlab.py')
-rw-r--r--tests/unit/test_gitlab.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/unit/test_gitlab.py b/tests/unit/test_gitlab.py
index 2bd7d4d..c147fa0 100644
--- a/tests/unit/test_gitlab.py
+++ b/tests/unit/test_gitlab.py
@@ -33,9 +33,7 @@ token = "abc123"
@urlmatch(scheme="http", netloc="localhost", path="/api/v4/user", method="get")
def resp_get_user(url, request):
headers = {"content-type": "application/json"}
- content = '{{"id": {0:d}, "username": "{1:s}"}}'.format(user_id, username).encode(
- "utf-8"
- )
+ content = f'{{"id": {user_id:d}, "username": "{username:s}"}}'.encode("utf-8")
return response(200, content, headers, None, 5, request)