budget/pfbudget/extract/credentials.py
Luís Murta eb5c1781f0
Get the PSD2 client under testing
Having a comprehension unit testing allows for peace of mind
refactoring.
Changed the PSD2Client constructor and extract method to accept
credentials and banks, respectively.

Create Exception tree for the Extract module.
Adds mocks to the NordigenClient requests' methods.
2023-04-15 13:57:46 +01:00

12 lines
177 B
Python

from dataclasses import dataclass
@dataclass
class Credentials:
id: str
key: str
token: str = ""
def valid(self) -> bool:
return self.id and self.key