Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
danibarranqueroo committed Mar 4, 2025
1 parent 0e9de48 commit 3f59299
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ def __init__(self, provider: Microsoft365Provider):
attributes = loop.run_until_complete(
gather(
self._get_authorization_policy(),
self._get_admin_consent_poolicy(),
self._get_admin_consent_policy(),
)
)

self.authorization_policy = attributes[0]
self.admin_consent_poolicy = attributes[1]
self.admin_consent_policy = attributes[1]

async def _get_authorization_policy(self):
logger.info("Entra - Getting authorization policy...")
Expand Down Expand Up @@ -85,7 +85,7 @@ async def _get_authorization_policy(self):

return authorization_policy

async def _get_admin_consent_poolicy(self):
async def _get_admin_consent_policy(self):
logger.info("Entra - Getting group settings...")
admin_consent_policy = None
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def test_admin_consent_disabled(self):

def test_no_policy(self):
"""
Test when entra_client.admin_consent_poolicy is None:
Test when entra_client.admin_consent_policy is None:
The check should return an empty list of findings.
"""
entra_client = mock.MagicMock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def mock_entra_get_authorization_policy(_):
)


async def mock_entra_get_admin_consent_poolicy(_):
async def mock_entra_get_admin_consent_policy(_):
return AdminConsentPolicy(
admin_consent_enabled=True,
notify_reviewers=True,
Expand Down Expand Up @@ -67,12 +67,12 @@ def test_get_authorization_policy(self):
)

@patch(
"prowler.providers.microsoft365.services.entra.entra_service.Entra._get_admin_consent_poolicy",
new=mock_entra_get_admin_consent_poolicy,
"prowler.providers.microsoft365.services.entra.entra_service.Entra._get_admin_consent_policy",
new=mock_entra_get_admin_consent_policy,
)
def test_get_admin_consent_poolicy(self):
def test_get_admin_consent_policy(self):
entra_client = Entra(set_mocked_microsoft365_provider())
assert entra_client.admin_consent_poolicy.admin_consent_enabled
assert entra_client.admin_consent_poolicy.notify_reviewers
assert entra_client.admin_consent_poolicy.email_reminders_to_reviewers is False
assert entra_client.admin_consent_poolicy.duration_in_days == 30
assert entra_client.admin_consent_policy.admin_consent_enabled
assert entra_client.admin_consent_policy.notify_reviewers
assert entra_client.admin_consent_policy.email_reminders_to_reviewers is False
assert entra_client.admin_consent_policy.duration_in_days == 30

0 comments on commit 3f59299

Please sign in to comment.