We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42ca399 commit 0e4231dCopy full SHA for 0e4231d
tests/unit/mocks.py
@@ -1,9 +1,10 @@
1
from decimal import Decimal
2
+from typing import Any
3
from unittest.mock import AsyncMock, MagicMock
4
5
from aleph.sdk.chains.evm import EVMAccount
6
from aleph.sdk.conf import settings
-from pydantic import BaseModel
7
+from pydantic import BaseModel, ConfigDict
8
9
from aleph_client.commands.node import NodeInfo
10
@@ -30,8 +31,14 @@
30
31
32
33
class Dict(BaseModel):
- class Config:
34
- extra = "allow"
+ model_config = ConfigDict(extra="allow")
35
+
36
+ def __init__(self, **data: Any):
37
+ """Allow any key-value pair to be passed to the model."""
38
+ super().__init__(**data)
39
40
+ def to_dict(self) -> dict[str, Any]:
41
+ return self.model_dump()
42
43
44
def create_test_account() -> EVMAccount:
0 commit comments