33 lines
896 B
Python
33 lines
896 B
Python
import logging
|
|
|
|
from core.clients.aggregator import AggregatorClient
|
|
from core.models import Aggregator, Platform, User
|
|
|
|
|
|
class AggregatorPlatformMixin:
|
|
def setUp(self):
|
|
logging.disable(logging.CRITICAL)
|
|
self.user = User.objects.create_user(
|
|
username="testuser", email="test@example.com", password="test"
|
|
)
|
|
self.aggregator = Aggregator.objects.create(
|
|
user=self.user,
|
|
name="Test",
|
|
service="nordigen",
|
|
secret_id="a",
|
|
secret_key="a",
|
|
)
|
|
|
|
self.agg_client = AggregatorClient()
|
|
self.agg_client.instance = self.aggregator
|
|
|
|
self.platform = Platform.objects.create(
|
|
user=self.user,
|
|
name="Test",
|
|
service="agora",
|
|
token="a",
|
|
password="a",
|
|
otp_token="a",
|
|
username="myuser",
|
|
)
|