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.
12 lines
177 B
Python
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
|