Skip to content

Commit

Permalink
chore: always use context manager for file IO
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch authored and JohnVillalovos committed Jan 23, 2022
1 parent 019a40f commit e8031f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/functional/api/test_users.py
Expand Up @@ -23,7 +23,8 @@ def test_create_user(gl, fixture_dir):

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


def test_block_user(gl, user):
Expand Down

0 comments on commit e8031f4

Please sign in to comment.