Skip to content

Commit 4afc255

Browse files
fix: TT-583 unable to set admin role to users
1 parent 56f02cd commit 4afc255

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

tests/utils/azure_users_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_add_user_to_group(
217217
get_group_id_by_group_name_mock.assert_called_once()
218218
get_groups_and_users_mock.assert_called_once()
219219
get_user_mock.assert_called_once()
220-
assert expected_value() == test_user
220+
assert expected_value == test_user
221221

222222

223223
@patch('utils.azure_users.AzureConnection.get_msal_client', Mock())
@@ -245,7 +245,7 @@ def test_remove_user_from_group(
245245
get_group_id_by_group_name_mock.assert_called_once()
246246
get_groups_and_users_mock.assert_called_once()
247247
get_user_mock.assert_called_once()
248-
assert expected_value() == test_user
248+
assert expected_value == test_user
249249

250250

251251
@patch('utils.azure_users.AzureConnection.get_groups_and_users')

utils/azure_users.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ def __init__(self, id, name, email, roles, groups):
4545
self.roles = roles
4646
self.groups = groups
4747

48-
def __eq__(self, other):
49-
return isinstance(other, AzureUser) and \
50-
self.id == other.id and \
51-
self.name == other.name and \
52-
self.email == other.email and \
53-
set(self.roles) == set(other.roles) and \
54-
set(self.groups) == set(other.groups)
55-
5648

5749
HTTP_PATCH_HEADERS = {
5850
'Content-type': 'application/json',

0 commit comments

Comments
 (0)