diff options
author | John L. Villalovos <john@sodarock.com> | 2022-07-19 16:41:22 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-07-19 16:41:22 -0700 |
commit | a29cd6ce1ff7fa7f31a386cea3e02aa9ba3fb6c2 (patch) | |
tree | 876b61cc40580f2dbdfdba0e872a759788f3b139 /tests | |
parent | ed110bd131fd330e20ec55915b9452dbf8002e0b (diff) | |
download | gitlab-a29cd6ce1ff7fa7f31a386cea3e02aa9ba3fb6c2.tar.gz |
chore: enable mypy check `strict_equality`
Enable the `mypy` `strict_equality` check.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/api/test_users.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/functional/api/test_users.py b/tests/functional/api/test_users.py index bdee130..a099e8f 100644 --- a/tests/functional/api/test_users.py +++ b/tests/functional/api/test_users.py @@ -28,14 +28,26 @@ def test_create_user(gl, fixture_dir): def test_block_user(gl, user): - user.block() + result = user.block() + assert result is True users = gl.users.list(blocked=True) assert user in users - user.unblock() + # block again + result = user.block() + # Trying to block an already blocked user returns None + assert result is None + + result = user.unblock() + assert result is True users = gl.users.list(blocked=False) assert user in users + # unblock again + result = user.unblock() + # Trying to unblock an already blocked user returns False + assert result is False + def test_ban_user(gl, user): user.ban() |