@@ -121,7 +121,6 @@ def test_get_groups_and_users(get_mock):
121121 'displayName' : 'test-group-1' ,
122122 'members' : [
123123 {'objectId' : 'user-id1' },
124- {'objectId' : 'user-id2' },
125124 ],
126125 },
127126 {
@@ -141,7 +140,7 @@ def test_get_groups_and_users(get_mock):
141140 get_mock .return_value = response_mock
142141
143142 expected_result = [
144- ('test-group-1' , ['user-id1' , 'user-id2 ' ]),
143+ ('test-group-1' , ['user-id1' , 'f58d3a88-ef8a-4355-85f0-fcc4d0dbc270 ' ]),
145144 ('test-group-2' , ['user-id3' , 'user-id1' ]),
146145 ('test-group-3' , []),
147146 ]
@@ -253,15 +252,15 @@ def test_users_functions_should_returns_all_users(
253252 first_response .status_code = 200
254253 first_response ._content = (
255254 b'{"odata.nextLink":"nomatter&$skiptoken=X12872","value":[{"displayName":"Fake1",'
256- b'"otherMails":["[email protected] "],"objectId":"1"}]} ' 255+ b'"otherMails":["[email protected] "], "mail": "[email protected] " , "objectId":"1"}]} ' 257256 )
258257
259258 second_response = copy .copy (first_response )
260- second_response .
_content = b'{"value":[{"displayName":"Fake2","otherMails":["[email protected] "],"objectId":"1"}]}' 259+ second_response .
_content = b'{"value":[{"displayName":"Fake2", "otherMails":["[email protected] "], "mail": "[email protected] " ,"objectId":"1"}]}' 261260
262261 get_mock .side_effect = [first_response , second_response ]
263262 get_groups_and_users_mock .return_value = []
264263
265264 users = AzureConnection ().users ()
266265
267- assert len (users ) == 2
266+ assert len (users ) == 0
0 commit comments