Changeset - 4d7dcd25c149
default
0
2
0
tests: admin_users: make sure all custom IP permissions are cleared
test_delete_ip changes IP permissions and at the end tries to clean up by
deleting it again. When the delete fails, there is still a restricted IP
permission configuration, causing other tests to fail.
Use the recently added pytest fixture auto_clear_ip_permissions to fix this.
The fixture is extended to not only clear IP permissions for the default
user, but also for the 'regular' test user.
Similar cleanup code in test_add_ip is deleted because it serves the same
purpose, but would fail to execute if something went wrong earlier in the
test method.
This commit is very similar to an earlier commit that covers similar
add/delete IP functionality for the default user, in test_permissions.py.
test_delete_ip changes IP permissions and at the end tries to clean up by
deleting it again. When the delete fails, there is still a restricted IP
permission configuration, causing other tests to fail.
Use the recently added pytest fixture auto_clear_ip_permissions to fix this.
The fixture is extended to not only clear IP permissions for the default
user, but also for the 'regular' test user.
Similar cleanup code in test_add_ip is deleted because it serves the same
purpose, but would fail to execute if something went wrong earlier in the
test method.
This commit is very similar to an earlier commit that covers similar
add/delete IP functionality for the default user, in test_permissions.py.
2 files changed with 11 insertions and 12 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)