Skip to content

Commit e8031f4

Browse files
nejchJohnVillalovos
authored andcommitted
chore: always use context manager for file IO
1 parent 019a40f commit e8031f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/functional/api/test_users.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def test_create_user(gl, fixture_dir):
2323

2424
avatar_url = user.avatar_url.replace("gitlab.test", "localhost:8080")
2525
uploaded_avatar = requests.get(avatar_url).content
26-
assert uploaded_avatar == open(fixture_dir / "avatar.png", "rb").read()
26+
with open(fixture_dir / "avatar.png", "rb") as f:
27+
assert uploaded_avatar == f.read()
2728

2829

2930
def test_block_user(gl, user):

0 commit comments

Comments
 (0)