Skip to content

Commit cf58cda

Browse files
Ihor BilousIhor Bilous
authored andcommitted
Fix issue #45: Change docstring in test, make params field as an optional
1 parent 57f8686 commit cf58cda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mailtrap/models/contacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ class ContactEvent:
157157
contact_id: str
158158
contact_email: str
159159
name: str
160-
params: dict[str, Any]
160+
params: Optional[dict[str, Any]] = None

tests/unit/models/test_contacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def test_contact_event_params_api_data_should_return_correct_dict(
227227
}
228228

229229
def test_contact_event_params_with_empty_params_should_work(self) -> None:
230-
"""Test that empty filters list works correctly."""
230+
"""Test that ContactEventParams works correctly when params are omitted."""
231231
params = ContactEventParams(name="UserLogin")
232232
api_data = params.api_data
233233
assert api_data == {"name": "UserLogin"}

0 commit comments

Comments
 (0)