summaryrefslogtreecommitdiff
path: root/tests/functional/api/test_projects.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-01-23 10:20:22 +0100
committerJohn Villalovos <john@sodarock.com>2022-01-23 07:14:49 -0800
commitcfed62242e93490b8548c79f4ad16bd87de18e3e (patch)
tree61461fd752e85c5715a491de325a3b4ea7a393f2 /tests/functional/api/test_projects.py
parentdc32d54c49ccc58c01cd436346a3fbfd4a538778 (diff)
downloadgitlab-cfed62242e93490b8548c79f4ad16bd87de18e3e.tar.gz
style: use f-strings where applicable
Diffstat (limited to 'tests/functional/api/test_projects.py')
-rw-r--r--tests/functional/api/test_projects.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/functional/api/test_projects.py b/tests/functional/api/test_projects.py
index d1ace2a..44241d4 100644
--- a/tests/functional/api/test_projects.py
+++ b/tests/functional/api/test_projects.py
@@ -106,12 +106,11 @@ def test_project_file_uploads(project):
file_contents = "testing contents"
uploaded_file = project.upload(filename, file_contents)
- assert uploaded_file["alt"] == filename
- assert uploaded_file["url"].startswith("/uploads/")
- assert uploaded_file["url"].endswith(f"/{filename}")
- assert uploaded_file["markdown"] == "[{}]({})".format(
- uploaded_file["alt"], uploaded_file["url"]
- )
+ alt, url = uploaded_file["alt"], uploaded_file["url"]
+ assert alt == filename
+ assert url.startswith("/uploads/")
+ assert url.endswith(f"/{filename}")
+ assert uploaded_file["markdown"] == f"[{alt}]({url})"
def test_project_forks(gl, project, user):