Files
prowler/tests/providers/linode/linode_fixtures.py
T
varunmamillapalli 8a1d7bcd6b feat(linode): add provider with administration compute and networking services (#11633)
Co-authored-by: Daniel Barranquero <danielbo2001@gmail.com>
Co-authored-by: Hugo P.Brito <hugopbrit@gmail.com>
2026-06-22 11:19:20 +02:00

35 lines
803 B
Python

from unittest.mock import MagicMock
from prowler.providers.linode.models import (
LinodeIdentityInfo,
LinodeSession,
)
# Linode Identity
USERNAME = "admin"
EMAIL = "admin@example.com"
ACCOUNT_ID = "E1AF1B6C-1111-2222-3333-444455556666"
# Linode Credentials
TOKEN = "fake-linode-token-for-testing"
def set_mocked_linode_provider(
username: str = USERNAME,
email: str = EMAIL,
account_id: str = ACCOUNT_ID,
):
"""Return a mocked LinodeProvider with identity and session set."""
provider = MagicMock()
provider.type = "linode"
provider.identity = LinodeIdentityInfo(
username=username,
email=email,
account_id=account_id,
)
provider.session = LinodeSession(
client=MagicMock(),
token=TOKEN,
)
return provider