Add tests for permission managment
https://gitlab.hzdr.de/hub-terra/sms/backend/-/merge_requests/265#note_1335586
TODOs:
-
test of patch for internal configuration & user with group permission -
test of patch for an internal configuration & user without group permission -
test of patch for an internal configuration & superuser -
detail view patch & delete with mocking IDL calls
I think we can combine those also with the tests for public configurations - as the logic and the results should be the very same (users with groups & superuser can, others can't).
For the delete requests, we need those as well. Maybe here also with the case of a user that is in the group as member but not as admin.
Maybe use: https://docs.python.org/3/library/unittest.mock.html
Edited by Kotyba Alhaj Taha