Skip to content

Commit 22d305a

Browse files
committed
test(m365): isolate Entra client mocks
- Prevent organization state from leaking between checks - Configure the plural organizations attribute used by production
1 parent c6e2a31 commit 22d305a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/providers/m365/services/entra/entra_password_hash_sync_enabled/entra_password_hash_sync_enabled_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_password_hash_sync_disabled_two_org(self):
135135

136136
def test_empty_organization(self):
137137
entra_client = mock.MagicMock()
138-
entra_client.organization = []
138+
entra_client.organizations = []
139139

140140
with (
141141
mock.patch(

tests/providers/m365/services/entra/entra_password_protection_on_premises_enforced/entra_password_protection_on_premises_enforced_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Test_entra_password_protection_on_premises_enforced:
1313
def _run(self, directory_settings, organizations=None):
14-
entra_client = mock.MagicMock
14+
entra_client = mock.MagicMock()
1515
with (
1616
mock.patch(
1717
"prowler.providers.common.provider.Provider.get_global_provider",

0 commit comments

Comments
 (0)