diff --git a/resend/automations/_automation.py b/resend/automations/_automation.py index 541f608..4e99be4 100644 --- a/resend/automations/_automation.py +++ b/resend/automations/_automation.py @@ -118,11 +118,11 @@ class AutomationRunStep(TypedDict): """ started_at: Union[str, None] """ - When the step started executing (ISO 8601 format), or None if not started. + When the step started executing, or None if not started. """ completed_at: Union[str, None] """ - When the step completed executing (ISO 8601 format), or None if not completed. + When the step completed executing, or None if not completed. """ output: Any """ @@ -134,7 +134,7 @@ class AutomationRunStep(TypedDict): """ created_at: str """ - When the run step was created (ISO 8601 format). + When the run step was created. """ @@ -164,11 +164,11 @@ class AutomationListItem(TypedDict): """ created_at: str """ - When the automation was created (ISO 8601 format). + When the automation was created. """ updated_at: str """ - When the automation was last updated (ISO 8601 format). + When the automation was last updated. """ @@ -205,11 +205,11 @@ class Automation(TypedDict): """ created_at: str """ - When the automation was created (ISO 8601 format). + When the automation was created. """ updated_at: str """ - When the automation was last updated (ISO 8601 format). + When the automation was last updated. """ steps: List[AutomationResponseStep] """ @@ -243,15 +243,15 @@ class AutomationRunListItem(TypedDict): """ started_at: Union[str, None] """ - When the run started (ISO 8601 format), or None. + When the run started, or None. """ completed_at: Union[str, None] """ - When the run completed (ISO 8601 format), or None. + When the run completed, or None. """ created_at: str """ - When the run was created (ISO 8601 format). + When the run was created. """ @@ -283,15 +283,15 @@ class AutomationRun(TypedDict): """ started_at: Union[str, None] """ - When the run started (ISO 8601 format), or None. + When the run started, or None. """ completed_at: Union[str, None] """ - When the run completed (ISO 8601 format), or None. + When the run completed, or None. """ created_at: str """ - When the run was created (ISO 8601 format). + When the run was created. """ steps: List[AutomationRunStep] """ diff --git a/resend/contact_properties/_contact_property.py b/resend/contact_properties/_contact_property.py index 73ea952..751d79c 100644 --- a/resend/contact_properties/_contact_property.py +++ b/resend/contact_properties/_contact_property.py @@ -11,7 +11,7 @@ class ContactProperty(TypedDict): id (str): The unique identifier for the contact property key (str): The key name of the property object (str): The object type, always "contact_property" - created_at (str): The ISO 8601 timestamp when the property was created + created_at (str): The timestamp when the property was created type (str): The data type of the property (e.g., "string", "number") fallback_value (Union[str, int, float, None]): The default value used when a contact doesn't have this property set """ @@ -30,7 +30,7 @@ class ContactProperty(TypedDict): """ created_at: str """ - The ISO 8601 timestamp when the property was created. + The timestamp when the property was created. """ type: str """ diff --git a/resend/contacts/imports/_contact_import.py b/resend/contacts/imports/_contact_import.py index 992d48d..96fd679 100644 --- a/resend/contacts/imports/_contact_import.py +++ b/resend/contacts/imports/_contact_import.py @@ -32,7 +32,7 @@ class ContactImport(BaseResponse): object (str): Always 'contact_import'. id (str): Unique identifier for the contact import. status (str): 'queued', 'in_progress', 'completed', or 'failed'. - created_at (str): ISO 8601 timestamp of when the import was created. + created_at (str): Timestamp of when the import was created. counts (ContactImportCounts): Row-level import statistics (present when status is completed or failed). """ diff --git a/resend/events/_event.py b/resend/events/_event.py index 6ae9935..b19e5c9 100644 --- a/resend/events/_event.py +++ b/resend/events/_event.py @@ -41,11 +41,11 @@ class EventListItem(TypedDict): """ created_at: str """ - When the event was created (ISO 8601 format). + When the event was created. """ updated_at: Union[str, None] """ - When the event was last updated (ISO 8601 format), or None. + When the event was last updated, or None. """ @@ -80,9 +80,9 @@ class Event(TypedDict): """ created_at: str """ - When the event was created (ISO 8601 format). + When the event was created. """ updated_at: Union[str, None] """ - When the event was last updated (ISO 8601 format), or None. + When the event was last updated, or None. """ diff --git a/resend/webhooks/_webhook.py b/resend/webhooks/_webhook.py index 0fc20c4..caf0aa5 100644 --- a/resend/webhooks/_webhook.py +++ b/resend/webhooks/_webhook.py @@ -100,7 +100,7 @@ class Webhook(TypedDict): """ created_at: str """ - When the webhook was created (ISO 8601 format) + When the webhook was created """ status: WebhookStatus """ diff --git a/tests/api_keys_async_test.py b/tests/api_keys_async_test.py index c258805..c1f8c6b 100644 --- a/tests/api_keys_async_test.py +++ b/tests/api_keys_async_test.py @@ -41,7 +41,7 @@ async def test_api_keys_list_async(self) -> None: { "id": "91f3200a-df72-4654-b0cd-f202395f5354", "name": "Production", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", } ] } @@ -51,7 +51,7 @@ async def test_api_keys_list_async(self) -> None: for key in keys["data"]: assert key["id"] == "91f3200a-df72-4654-b0cd-f202395f5354" assert key["name"] == "Production" - assert key["created_at"] == "2023-04-08T00:11:13.110779+00:00" + assert key["created_at"] == "2023-04-08 00:11:13.110779+00" async def test_should_list_api_key_async_raise_exception_when_no_content( self, diff --git a/tests/api_keys_test.py b/tests/api_keys_test.py index f9e1e42..2d5805f 100644 --- a/tests/api_keys_test.py +++ b/tests/api_keys_test.py @@ -37,8 +37,8 @@ def test_api_keys_list(self) -> None: { "id": "91f3200a-df72-4654-b0cd-f202395f5354", "name": "Production", - "created_at": "2023-04-08T00:11:13.110779+00:00", - "last_used_at": "2023-04-08T12:00:00.000000+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", + "last_used_at": "2023-04-08 12:00:00+00", } ], } @@ -50,8 +50,8 @@ def test_api_keys_list(self) -> None: for key in keys["data"]: assert key["id"] == "91f3200a-df72-4654-b0cd-f202395f5354" assert key["name"] == "Production" - assert key["created_at"] == "2023-04-08T00:11:13.110779+00:00" - assert key["last_used_at"] == "2023-04-08T12:00:00.000000+00:00" + assert key["created_at"] == "2023-04-08 00:11:13.110779+00" + assert key["last_used_at"] == "2023-04-08 12:00:00+00" def test_api_keys_list_last_used_at_none(self) -> None: self.set_mock_json( @@ -62,7 +62,7 @@ def test_api_keys_list_last_used_at_none(self) -> None: { "id": "91f3200a-df72-4654-b0cd-f202395f5354", "name": "Production", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", "last_used_at": None, } ], @@ -86,12 +86,12 @@ def test_api_keys_list_with_pagination_params(self) -> None: { "id": "test-key-1", "name": "Test Key 1", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", }, { "id": "test-key-2", "name": "Test Key 2", - "created_at": "2023-04-09T00:11:13.110779+00:00", + "created_at": "2023-04-09 00:11:13.110779+00", }, ], } @@ -114,7 +114,7 @@ def test_api_keys_list_with_before_param(self) -> None: { "id": "test-key-3", "name": "Test Key 3", - "created_at": "2023-04-07T00:11:13.110779+00:00", + "created_at": "2023-04-07 00:11:13.110779+00", } ], } diff --git a/tests/async_response_headers_test.py b/tests/async_response_headers_test.py index e83f19a..26d6005 100644 --- a/tests/async_response_headers_test.py +++ b/tests/async_response_headers_test.py @@ -87,7 +87,7 @@ async def test_received_email_async_headers_not_overwritten_by_http_headers( mock_client.request.return_value = ( b'{"id": "email_456", "object": "received_email", ' b'"from": "sender@example.com", "to": ["recipient@example.com"], ' - b'"subject": "Hello", "created_at": "2024-01-01T00:00:00Z", ' + b'"subject": "Hello", "created_at": "2024-01-01 00:00:00+00", ' b'"message_id": "msg_123", "attachments": [], ' b'"headers": {"List-Unsubscribe": "", ' b'"X-Custom": "value"}}', diff --git a/tests/attachments_async_test.py b/tests/attachments_async_test.py index 44cf282..e539598 100644 --- a/tests/attachments_async_test.py +++ b/tests/attachments_async_test.py @@ -20,7 +20,7 @@ async def test_sent_email_attachments_get_async(self) -> None: "content_disposition": "inline", "content_id": "img001", "download_url": "https://cdn.resend.com/emails/test/attachments/test-id", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", } ) @@ -57,7 +57,7 @@ async def test_sent_email_attachments_list_async(self) -> None: "content_disposition": "inline", "size": 1024, "download_url": "https://cdn.resend.com/emails/test/attachments/test-id", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", } ], } diff --git a/tests/attachments_test.py b/tests/attachments_test.py index 9f99f5b..34256f1 100644 --- a/tests/attachments_test.py +++ b/tests/attachments_test.py @@ -18,7 +18,7 @@ def test_receiving_get_attachment(self) -> None: "content_disposition": "inline", "content_id": "img001", "download_url": "https://inbound-cdn.resend.com/4ef9a417-02e9-4d39-ad75-9611e0fcc33c/attachments/2a0c9ce0-3112-4728-976e-47ddcd16a318?some-params=example&signature=sig-123", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", } ) @@ -35,7 +35,7 @@ def test_receiving_get_attachment(self) -> None: assert attachment["content_disposition"] == "inline" assert attachment["content_id"] == "img001" assert "https://inbound-cdn.resend.com" in attachment["download_url"] - assert attachment["expires_at"] == "2025-10-17T14:29:41.521Z" + assert attachment["expires_at"] == "2025-10-17 14:29:41.521+00" def test_receiving_get_attachment_without_content_id(self) -> None: self.set_mock_json( @@ -46,7 +46,7 @@ def test_receiving_get_attachment_without_content_id(self) -> None: "content_type": "application/pdf", "content_disposition": "attachment", "download_url": "https://inbound-cdn.resend.com/test-email/attachments/test-attachment", - "expires_at": "2025-10-18T10:00:00.000Z", + "expires_at": "2025-10-18 10:00:00+00", } ) @@ -87,7 +87,7 @@ def test_receiving_list_attachments(self) -> None: "content_id": "img001", "size": 1024, "download_url": "https://inbound-cdn.resend.com/test/attachments/2a0c9ce0?signature=sig-123", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, { "id": "3b1d0df1-4223-5839-a87f-58eecd27b429", @@ -96,7 +96,7 @@ def test_receiving_list_attachments(self) -> None: "content_disposition": "attachment", "size": 2048, "download_url": "https://inbound-cdn.resend.com/test/attachments/3b1d0df1?signature=sig-456", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, ], } @@ -115,7 +115,7 @@ def test_receiving_list_attachments(self) -> None: assert attachments["data"][0]["filename"] == "avatar.png" assert attachments["data"][0]["size"] == 1024 assert "https://inbound-cdn.resend.com" in attachments["data"][0]["download_url"] - assert attachments["data"][0]["expires_at"] == "2025-10-17T14:29:41.521Z" + assert attachments["data"][0]["expires_at"] == "2025-10-17 14:29:41.521+00" assert attachments["data"][1]["id"] == "3b1d0df1-4223-5839-a87f-58eecd27b429" assert attachments["data"][1]["filename"] == "document.pdf" @@ -132,7 +132,7 @@ def test_receiving_list_attachments_with_pagination(self) -> None: "content_disposition": "inline", "size": 1024, "download_url": "https://inbound-cdn.resend.com/test/attachments/2a0c9ce0?signature=sig-123", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, ], } diff --git a/tests/audiences_async_test.py b/tests/audiences_async_test.py index bbbb8a9..d37b1d4 100644 --- a/tests/audiences_async_test.py +++ b/tests/audiences_async_test.py @@ -42,7 +42,7 @@ async def test_segments_get_async(self) -> None: "object": "audience", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ) @@ -51,7 +51,7 @@ async def test_segments_get_async(self) -> None: ) assert segment["id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert segment["name"] == "Registered Users" - assert segment["created_at"] == "2023-10-06T22:59:55.977Z" + assert segment["created_at"] == "2023-10-06 22:59:55.977+00" async def test_should_get_segments_async_raise_exception_when_no_content( self, @@ -94,7 +94,7 @@ async def test_segments_list_async(self) -> None: { "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ], } @@ -147,7 +147,7 @@ async def test_audiences_get_async(self) -> None: "object": "audience", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ) @@ -157,7 +157,7 @@ async def test_audiences_get_async(self) -> None: ) assert audience["id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert audience["name"] == "Registered Users" - assert audience["created_at"] == "2023-10-06T22:59:55.977Z" + assert audience["created_at"] == "2023-10-06 22:59:55.977+00" async def test_audiences_get_async_raises_when_no_content( self, @@ -207,7 +207,7 @@ async def test_audiences_list_async(self) -> None: { "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ], } diff --git a/tests/audiences_test.py b/tests/audiences_test.py index d05a355..2a964e4 100644 --- a/tests/audiences_test.py +++ b/tests/audiences_test.py @@ -36,14 +36,14 @@ def test_audiences_get(self) -> None: "object": "audience", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ) audience = resend.Audiences.get(id="78261eea-8f8b-4381-83c6-79fa7120f1cf") assert audience["id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert audience["name"] == "Registered Users" - assert audience["created_at"] == "2023-10-06T22:59:55.977Z" + assert audience["created_at"] == "2023-10-06 22:59:55.977+00" def test_should_get_audiences_raise_exception_when_no_content(self) -> None: self.set_mock_json(None) @@ -80,7 +80,7 @@ def test_audiences_list(self) -> None: { "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ], } @@ -106,12 +106,12 @@ def test_audiences_list_with_pagination_params(self) -> None: { "id": "audience-1", "name": "First Audience", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", }, { "id": "audience-2", "name": "Second Audience", - "created_at": "2023-10-07T22:59:55.977Z", + "created_at": "2023-10-07 22:59:55.977+00", }, ], } @@ -137,7 +137,7 @@ def test_audiences_list_with_before_param(self) -> None: { "id": "audience-3", "name": "Third Audience", - "created_at": "2023-10-05T22:59:55.977Z", + "created_at": "2023-10-05 22:59:55.977+00", } ], } diff --git a/tests/automations_async_test.py b/tests/automations_async_test.py index 7b8cfda..6dbe0bc 100644 --- a/tests/automations_async_test.py +++ b/tests/automations_async_test.py @@ -56,8 +56,8 @@ async def test_automations_get_async(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", "steps": [], "connections": [], } @@ -155,8 +155,8 @@ async def test_automations_list_async(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", }, ], } @@ -182,9 +182,9 @@ async def test_automations_list_runs_async(self) -> None: { "id": "run_123", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:05:00.000Z", - "created_at": "2024-01-01T09:59:00.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:05:00+00", + "created_at": "2024-01-01 09:59:00+00", }, ], } @@ -211,9 +211,9 @@ async def test_automations_get_run_async(self) -> None: "object": "automation_run", "id": "run_123", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:05:00.000Z", - "created_at": "2024-01-01T09:59:00.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:05:00+00", + "created_at": "2024-01-01 09:59:00+00", "steps": [], } ) diff --git a/tests/automations_test.py b/tests/automations_test.py index 9f09243..020f1c6 100644 --- a/tests/automations_test.py +++ b/tests/automations_test.py @@ -65,8 +65,8 @@ def test_automations_get(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", "steps": [ { "key": "trigger_1", @@ -83,8 +83,8 @@ def test_automations_get(self) -> None: assert automation["id"] == "b6d24b8e-af0b-4c3c-be0c-359bbd97381e" assert automation["name"] == "Welcome Sequence" assert automation["status"] == "enabled" - assert automation["created_at"] == "2024-01-01T00:00:00.000Z" - assert automation["updated_at"] == "2024-01-02T00:00:00.000Z" + assert automation["created_at"] == "2024-01-01 00:00:00+00" + assert automation["updated_at"] == "2024-01-02 00:00:00+00" assert len(automation["steps"]) == 1 assert automation["steps"][0]["key"] == "trigger_1" assert automation["steps"][0]["type"] == "trigger" @@ -159,15 +159,15 @@ def test_automations_list(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", }, { "id": "c7e35c9f-bf1c-5d4d-cf1d-460cce08492f", "name": "Onboarding Flow", "status": "disabled", - "created_at": "2024-02-01T00:00:00.000Z", - "updated_at": "2024-02-02T00:00:00.000Z", + "created_at": "2024-02-01 00:00:00+00", + "updated_at": "2024-02-02 00:00:00+00", }, ], } @@ -182,7 +182,7 @@ def test_automations_list(self) -> None: assert first["id"] == "b6d24b8e-af0b-4c3c-be0c-359bbd97381e" assert first["name"] == "Welcome Sequence" assert first["status"] == "enabled" - assert first["created_at"] == "2024-01-01T00:00:00.000Z" + assert first["created_at"] == "2024-01-01 00:00:00+00" second = automations["data"][1] assert second["id"] == "c7e35c9f-bf1c-5d4d-cf1d-460cce08492f" @@ -198,8 +198,8 @@ def test_automations_list_with_status_filter(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", }, ], } @@ -221,8 +221,8 @@ def test_automations_list_with_pagination_params(self) -> None: "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e", "name": "Welcome Sequence", "status": "enabled", - "created_at": "2024-01-01T00:00:00.000Z", - "updated_at": "2024-01-02T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", + "updated_at": "2024-01-02 00:00:00+00", }, ], } @@ -245,16 +245,16 @@ def test_automations_list_runs(self) -> None: { "id": "run_123", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:05:00.000Z", - "created_at": "2024-01-01T09:59:00.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:05:00+00", + "created_at": "2024-01-01 09:59:00+00", }, { "id": "run_456", "status": "running", - "started_at": "2024-01-02T10:00:00.000Z", + "started_at": "2024-01-02 10:00:00+00", "completed_at": None, - "created_at": "2024-01-02T09:59:00.000Z", + "created_at": "2024-01-02 09:59:00+00", }, ], } @@ -268,8 +268,8 @@ def test_automations_list_runs(self) -> None: first = runs["data"][0] assert first["id"] == "run_123" assert first["status"] == "completed" - assert first["started_at"] == "2024-01-01T10:00:00.000Z" - assert first["completed_at"] == "2024-01-01T10:05:00.000Z" + assert first["started_at"] == "2024-01-01 10:00:00+00" + assert first["completed_at"] == "2024-01-01 10:05:00+00" second = runs["data"][1] assert second["id"] == "run_456" @@ -285,9 +285,9 @@ def test_automations_list_runs_with_status_filter(self) -> None: { "id": "run_123", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:05:00.000Z", - "created_at": "2024-01-01T09:59:00.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:05:00+00", + "created_at": "2024-01-01 09:59:00+00", }, ], } @@ -306,29 +306,29 @@ def test_automations_get_run(self) -> None: "object": "automation_run", "id": "run_123", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:05:00.000Z", - "created_at": "2024-01-01T09:59:00.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:05:00+00", + "created_at": "2024-01-01 09:59:00+00", "steps": [ { "key": "trigger_1", "type": "trigger", "status": "completed", - "started_at": "2024-01-01T10:00:00.000Z", - "completed_at": "2024-01-01T10:00:01.000Z", + "started_at": "2024-01-01 10:00:00+00", + "completed_at": "2024-01-01 10:00:01+00", "output": None, "error": None, - "created_at": "2024-01-01T09:59:00.000Z", + "created_at": "2024-01-01 09:59:00+00", }, { "key": "email_1", "type": "send_email", "status": "completed", - "started_at": "2024-01-01T10:01:00.000Z", - "completed_at": "2024-01-01T10:01:02.000Z", + "started_at": "2024-01-01 10:01:00+00", + "completed_at": "2024-01-01 10:01:02+00", "output": None, "error": None, - "created_at": "2024-01-01T09:59:00.000Z", + "created_at": "2024-01-01 09:59:00+00", }, ], } @@ -340,8 +340,8 @@ def test_automations_get_run(self) -> None: assert run["object"] == "automation_run" assert run["id"] == "run_123" assert run["status"] == "completed" - assert run["started_at"] == "2024-01-01T10:00:00.000Z" - assert run["completed_at"] == "2024-01-01T10:05:00.000Z" + assert run["started_at"] == "2024-01-01 10:00:00+00" + assert run["completed_at"] == "2024-01-01 10:05:00+00" assert len(run["steps"]) == 2 assert run["steps"][0]["key"] == "trigger_1" assert run["steps"][0]["type"] == "trigger" diff --git a/tests/broadcasts_async_test.py b/tests/broadcasts_async_test.py index c1e6f23..1f4a759 100644 --- a/tests/broadcasts_async_test.py +++ b/tests/broadcasts_async_test.py @@ -76,7 +76,7 @@ async def test_broadcasts_get_async(self) -> None: "reply_to": None, "preview_text": "Check out our latest announcements", "status": "draft", - "created_at": "2024-12-01T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", "scheduled_at": None, "sent_at": None, } @@ -93,7 +93,7 @@ async def test_broadcasts_get_async(self) -> None: assert broadcast["reply_to"] is None assert broadcast["preview_text"] == "Check out our latest announcements" assert broadcast["status"] == "draft" - assert broadcast["created_at"] == "2024-12-01T19:32:22.980Z" + assert broadcast["created_at"] == "2024-12-01 19:32:22.98+00" assert broadcast["scheduled_at"] is None assert broadcast["sent_at"] is None @@ -158,7 +158,7 @@ async def test_broadcasts_list_async(self) -> None: "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "draft", - "created_at": "2024-11-01T15:13:31.723Z", + "created_at": "2024-11-01 15:13:31.723+00", "scheduled_at": None, "sent_at": None, }, @@ -166,9 +166,9 @@ async def test_broadcasts_list_async(self) -> None: "id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "sent", - "created_at": "2024-12-01T19:32:22.980Z", - "scheduled_at": "2024-12-02T19:32:22.980Z", - "sent_at": "2024-12-02T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", + "scheduled_at": "2024-12-02 19:32:22.98+00", + "sent_at": "2024-12-02 19:32:22.98+00", }, ], } @@ -184,7 +184,7 @@ async def test_broadcasts_list_async(self) -> None: assert broadcast["id"] == "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" assert broadcast["audience_id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert broadcast["status"] == "draft" - assert broadcast["created_at"] == "2024-11-01T15:13:31.723Z" + assert broadcast["created_at"] == "2024-11-01 15:13:31.723+00" assert broadcast["scheduled_at"] is None assert broadcast["sent_at"] is None @@ -192,9 +192,9 @@ async def test_broadcasts_list_async(self) -> None: assert broadcast["id"] == "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" assert broadcast["audience_id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert broadcast["status"] == "sent" - assert broadcast["created_at"] == "2024-12-01T19:32:22.980Z" - assert broadcast["scheduled_at"] == "2024-12-02T19:32:22.980Z" - assert broadcast["sent_at"] == "2024-12-02T19:32:22.980Z" + assert broadcast["created_at"] == "2024-12-01 19:32:22.98+00" + assert broadcast["scheduled_at"] == "2024-12-02 19:32:22.98+00" + assert broadcast["sent_at"] == "2024-12-02 19:32:22.98+00" async def test_should_list_broadcasts_async_raise_exception_when_no_content( self, diff --git a/tests/broadcasts_test.py b/tests/broadcasts_test.py index 6e2c1dd..4b1332c 100644 --- a/tests/broadcasts_test.py +++ b/tests/broadcasts_test.py @@ -42,7 +42,7 @@ def test_broadcasts_get(self) -> None: "reply_to": None, "preview_text": "Check out our latest announcements", "status": "draft", - "created_at": "2024-12-01T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", "scheduled_at": None, "sent_at": None, "html": "

Hello World

", @@ -59,7 +59,7 @@ def test_broadcasts_get(self) -> None: assert broadcast["reply_to"] is None assert broadcast["preview_text"] == "Check out our latest announcements" assert broadcast["status"] == "draft" - assert broadcast["created_at"] == "2024-12-01T19:32:22.980Z" + assert broadcast["created_at"] == "2024-12-01 19:32:22.98+00" assert broadcast["scheduled_at"] is None assert broadcast["sent_at"] is None assert broadcast["html"] == "

Hello World

" @@ -124,7 +124,7 @@ def test_broadcasts_list(self) -> None: "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "draft", - "created_at": "2024-11-01T15:13:31.723Z", + "created_at": "2024-11-01 15:13:31.723+00", "scheduled_at": None, "sent_at": None, }, @@ -132,9 +132,9 @@ def test_broadcasts_list(self) -> None: "id": "559ac32e-9ef5-46fb-82a1-b76b840c0f7b", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "sent", - "created_at": "2024-12-01T19:32:22.980Z", - "scheduled_at": "2024-12-02T19:32:22.980Z", - "sent_at": "2024-12-02T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", + "scheduled_at": "2024-12-02 19:32:22.98+00", + "sent_at": "2024-12-02 19:32:22.98+00", }, ], } @@ -149,7 +149,7 @@ def test_broadcasts_list(self) -> None: assert broadcast["id"] == "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794" assert broadcast["audience_id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert broadcast["status"] == "draft" - assert broadcast["created_at"] == "2024-11-01T15:13:31.723Z" + assert broadcast["created_at"] == "2024-11-01 15:13:31.723+00" assert broadcast["scheduled_at"] is None assert broadcast["sent_at"] is None @@ -157,9 +157,9 @@ def test_broadcasts_list(self) -> None: assert broadcast["id"] == "559ac32e-9ef5-46fb-82a1-b76b840c0f7b" assert broadcast["audience_id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert broadcast["status"] == "sent" - assert broadcast["created_at"] == "2024-12-01T19:32:22.980Z" - assert broadcast["scheduled_at"] == "2024-12-02T19:32:22.980Z" - assert broadcast["sent_at"] == "2024-12-02T19:32:22.980Z" + assert broadcast["created_at"] == "2024-12-01 19:32:22.98+00" + assert broadcast["scheduled_at"] == "2024-12-02 19:32:22.98+00" + assert broadcast["sent_at"] == "2024-12-02 19:32:22.98+00" def test_broadcasts_list_with_pagination_params(self) -> None: self.set_mock_json( @@ -171,7 +171,7 @@ def test_broadcasts_list_with_pagination_params(self) -> None: "id": "broadcast-1", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "draft", - "created_at": "2024-11-01T15:13:31.723Z", + "created_at": "2024-11-01 15:13:31.723+00", "scheduled_at": None, "sent_at": None, }, @@ -179,9 +179,9 @@ def test_broadcasts_list_with_pagination_params(self) -> None: "id": "broadcast-2", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "sent", - "created_at": "2024-12-01T19:32:22.980Z", - "scheduled_at": "2024-12-02T19:32:22.980Z", - "sent_at": "2024-12-02T19:32:22.980Z", + "created_at": "2024-12-01 19:32:22.98+00", + "scheduled_at": "2024-12-02 19:32:22.98+00", + "sent_at": "2024-12-02 19:32:22.98+00", }, ], } @@ -210,7 +210,7 @@ def test_broadcasts_list_with_before_param(self) -> None: "id": "broadcast-3", "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "status": "draft", - "created_at": "2024-10-01T15:13:31.723Z", + "created_at": "2024-10-01 15:13:31.723+00", "scheduled_at": None, "sent_at": None, } diff --git a/tests/contact_imports_test.py b/tests/contact_imports_test.py index d502aff..3dc1d0c 100644 --- a/tests/contact_imports_test.py +++ b/tests/contact_imports_test.py @@ -43,7 +43,7 @@ def test_get_contact_import(self) -> None: "object": "contact_import", "id": "479e3145-dd38-476b-932c-529ceb705947", "status": "completed", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "counts": { "total": 100, "created": 80, @@ -78,7 +78,7 @@ def test_list_contact_imports(self) -> None: "object": "contact_import", "id": "479e3145-dd38-476b-932c-529ceb705947", "status": "completed", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ], } diff --git a/tests/contact_properties_async_test.py b/tests/contact_properties_async_test.py index f33c4be..491defd 100644 --- a/tests/contact_properties_async_test.py +++ b/tests/contact_properties_async_test.py @@ -47,7 +47,7 @@ async def test_contact_properties_get_async(self) -> None: "id": "prop_123456", "key": "age", "object": "contact_property", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "type": "number", "fallback_value": 0, } @@ -78,7 +78,7 @@ async def test_contact_properties_list_async(self) -> None: "id": "prop_123456", "key": "age", "object": "contact_property", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "type": "number", "fallback_value": 0, } diff --git a/tests/contact_properties_test.py b/tests/contact_properties_test.py index 7c56c3c..fc069a4 100644 --- a/tests/contact_properties_test.py +++ b/tests/contact_properties_test.py @@ -47,7 +47,7 @@ def test_contact_properties_list(self) -> None: "id": "prop_123456", "key": "age", "object": "contact_property", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "type": "number", "fallback_value": 0, } @@ -82,7 +82,7 @@ def test_contact_properties_list_with_pagination(self) -> None: "id": "prop_1", "key": "age", "object": "contact_property", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "type": "number", "fallback_value": 0, }, @@ -90,7 +90,7 @@ def test_contact_properties_list_with_pagination(self) -> None: "id": "prop_2", "key": "city", "object": "contact_property", - "created_at": "2023-10-07T23:47:56.678Z", + "created_at": "2023-10-07 23:47:56.678+00", "type": "string", "fallback_value": "Unknown", }, @@ -117,7 +117,7 @@ def test_contact_properties_get(self) -> None: "id": "prop_123456", "key": "age", "object": "contact_property", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "type": "number", "fallback_value": 0, } diff --git a/tests/contacts_async_test.py b/tests/contacts_async_test.py index d503935..ff140d8 100644 --- a/tests/contacts_async_test.py +++ b/tests/contacts_async_test.py @@ -110,7 +110,7 @@ async def test_contacts_get_async(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -123,7 +123,7 @@ async def test_contacts_get_async(self) -> None: assert contact["email"] == "steve.wozniak@gmail.com" assert contact["first_name"] == "Steve" assert contact["last_name"] == "Wozniak" - assert contact["created_at"] == "2023-10-06T23:47:56.678Z" + assert contact["created_at"] == "2023-10-06 23:47:56.678+00" assert contact["unsubscribed"] is False async def test_contacts_get_async_by_email(self) -> None: @@ -134,7 +134,7 @@ async def test_contacts_get_async_by_email(self) -> None: "email": "steve@woz.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -147,7 +147,7 @@ async def test_contacts_get_async_by_email(self) -> None: assert contact["email"] == "steve@woz.com" assert contact["first_name"] == "Steve" assert contact["last_name"] == "Wozniak" - assert contact["created_at"] == "2023-10-06T23:47:56.678Z" + assert contact["created_at"] == "2023-10-06 23:47:56.678+00" assert contact["unsubscribed"] is False async def test_contacts_get_async_encodes_email_identifier(self) -> None: @@ -156,7 +156,7 @@ async def test_contacts_get_async_encodes_email_identifier(self) -> None: "object": "contact", "id": "e169aa45-1ecf-4183-9955-b1499d5701d3", "email": "team/a?b@example.com", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -276,7 +276,7 @@ async def test_contacts_list_async(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ], @@ -290,7 +290,7 @@ async def test_contacts_list_async(self) -> None: assert contacts["data"][0]["email"] == "steve.wozniak@gmail.com" assert contacts["data"][0]["first_name"] == "Steve" assert contacts["data"][0]["last_name"] == "Wozniak" - assert contacts["data"][0]["created_at"] == "2023-10-06T23:47:56.678Z" + assert contacts["data"][0]["created_at"] == "2023-10-06 23:47:56.678+00" assert contacts["data"][0]["unsubscribed"] is False async def test_should_list_contacts_async_raise_exception_when_no_content( @@ -313,7 +313,7 @@ async def test_contacts_list_async_by_segment_id(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ], diff --git a/tests/contacts_segments_async_test.py b/tests/contacts_segments_async_test.py index 7482156..7498e22 100644 --- a/tests/contacts_segments_async_test.py +++ b/tests/contacts_segments_async_test.py @@ -118,12 +118,12 @@ async def test_contact_segments_list_async(self) -> None: { "id": "segment-1", "name": "Segment 1", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", }, { "id": "segment-2", "name": "Segment 2", - "created_at": "2023-10-07T22:59:55.977Z", + "created_at": "2023-10-07 22:59:55.977+00", }, ], } diff --git a/tests/contacts_segments_test.py b/tests/contacts_segments_test.py index a103d3a..290f167 100644 --- a/tests/contacts_segments_test.py +++ b/tests/contacts_segments_test.py @@ -101,12 +101,12 @@ def test_contact_segments_list(self) -> None: { "id": "segment-1", "name": "Segment 1", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", }, { "id": "segment-2", "name": "Segment 2", - "created_at": "2023-10-07T22:59:55.977Z", + "created_at": "2023-10-07 22:59:55.977+00", }, ], } @@ -133,7 +133,7 @@ def test_contact_segments_list_with_email(self) -> None: { "id": "segment-3", "name": "Segment 3", - "created_at": "2023-10-08T22:59:55.977Z", + "created_at": "2023-10-08 22:59:55.977+00", } ], } @@ -176,7 +176,7 @@ def test_contact_segments_list_with_pagination(self) -> None: { "id": "segment-4", "name": "Segment 4", - "created_at": "2023-10-09T22:59:55.977Z", + "created_at": "2023-10-09 22:59:55.977+00", } ], } diff --git a/tests/contacts_test.py b/tests/contacts_test.py index ebb1f49..49841fc 100644 --- a/tests/contacts_test.py +++ b/tests/contacts_test.py @@ -82,7 +82,7 @@ def test_contacts_get(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -95,7 +95,7 @@ def test_contacts_get(self) -> None: assert contact["email"] == "steve.wozniak@gmail.com" assert contact.get("first_name") == "Steve" assert contact.get("last_name") == "Wozniak" - assert contact["created_at"] == "2023-10-06T23:47:56.678Z" + assert contact["created_at"] == "2023-10-06 23:47:56.678+00" assert contact["unsubscribed"] is False def test_contacts_get_by_email(self) -> None: @@ -106,7 +106,7 @@ def test_contacts_get_by_email(self) -> None: "email": "steve@woz.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -119,7 +119,7 @@ def test_contacts_get_by_email(self) -> None: assert contact["email"] == "steve@woz.com" assert contact["first_name"] == "Steve" assert contact["last_name"] == "Wozniak" - assert contact["created_at"] == "2023-10-06T23:47:56.678Z" + assert contact["created_at"] == "2023-10-06 23:47:56.678+00" assert contact["unsubscribed"] is False def test_contacts_get_encodes_email_identifier(self) -> None: @@ -128,7 +128,7 @@ def test_contacts_get_encodes_email_identifier(self) -> None: "object": "contact", "id": "e169aa45-1ecf-4183-9955-b1499d5701d3", "email": "team/a?b@example.com", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ) @@ -229,7 +229,7 @@ def test_contacts_list(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ], @@ -245,7 +245,7 @@ def test_contacts_list(self) -> None: assert contacts["data"][0]["email"] == "steve.wozniak@gmail.com" assert contacts["data"][0].get("first_name") == "Steve" assert contacts["data"][0].get("last_name") == "Wozniak" - assert contacts["data"][0]["created_at"] == "2023-10-06T23:47:56.678Z" + assert contacts["data"][0]["created_at"] == "2023-10-06 23:47:56.678+00" assert contacts["data"][0]["unsubscribed"] is False def test_should_list_contacts_raise_exception_when_no_content(self) -> None: @@ -264,7 +264,7 @@ def test_contacts_list_with_pagination_params(self) -> None: "email": "contact1@example.com", "first_name": "Contact", "last_name": "One", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, }, { @@ -272,7 +272,7 @@ def test_contacts_list_with_pagination_params(self) -> None: "email": "contact2@example.com", "first_name": "Contact", "last_name": "Two", - "created_at": "2023-10-07T23:47:56.678Z", + "created_at": "2023-10-07 23:47:56.678+00", "unsubscribed": False, }, ], @@ -303,7 +303,7 @@ def test_contacts_list_with_before_param(self) -> None: "email": "contact3@example.com", "first_name": "Contact", "last_name": "Three", - "created_at": "2023-10-05T23:47:56.678Z", + "created_at": "2023-10-05 23:47:56.678+00", "unsubscribed": False, } ], @@ -375,7 +375,7 @@ def test_contacts_get_global(self) -> None: "email": "global@example.com", "first_name": "Global", "last_name": "Contact", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, "properties": {"tier": "premium"}, } @@ -397,7 +397,7 @@ def test_contacts_list_global(self) -> None: "email": "global1@example.com", "first_name": "Global", "last_name": "One", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, "properties": {"tier": "free"}, }, @@ -406,7 +406,7 @@ def test_contacts_list_global(self) -> None: "email": "global2@example.com", "first_name": "Global", "last_name": "Two", - "created_at": "2023-10-07T23:47:56.678Z", + "created_at": "2023-10-07 23:47:56.678+00", "unsubscribed": False, "properties": {"tier": "premium"}, }, @@ -432,7 +432,7 @@ def test_contacts_list_by_segment_id(self) -> None: "email": "steve.wozniak@gmail.com", "first_name": "Steve", "last_name": "Wozniak", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ], @@ -458,7 +458,7 @@ def test_contacts_list_by_segment_id_with_pagination(self) -> None: "email": "contact1@example.com", "first_name": "Contact", "last_name": "One", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", "unsubscribed": False, } ], diff --git a/tests/domain_claims_async_test.py b/tests/domain_claims_async_test.py index 25f60a2..0f72957 100644 --- a/tests/domain_claims_async_test.py +++ b/tests/domain_claims_async_test.py @@ -27,8 +27,8 @@ async def test_domain_claims_create_async(self) -> None: }, "blocked_reason": None, "failure_reason": None, - "created_at": "2026-06-16T17:12:02.059593+00:00", - "expires_at": "2026-06-23T17:12:02.059593+00:00", + "created_at": "2026-06-16 17:12:02.059593+00", + "expires_at": "2026-06-23 17:12:02.059593+00", } ) @@ -81,8 +81,8 @@ async def test_domain_claims_get_async(self) -> None: "region": "us-east-1", "blocked_reason": "grace_period", "failure_reason": None, - "created_at": "2026-06-16T17:12:02.059593+00:00", - "expires_at": "2026-06-23T17:12:02.059593+00:00", + "created_at": "2026-06-16 17:12:02.059593+00", + "expires_at": "2026-06-23 17:12:02.059593+00", } ) diff --git a/tests/domain_claims_test.py b/tests/domain_claims_test.py index 0a4d1a5..1ac3b0b 100644 --- a/tests/domain_claims_test.py +++ b/tests/domain_claims_test.py @@ -23,8 +23,8 @@ def test_domain_claims_create(self) -> None: }, "blocked_reason": None, "failure_reason": None, - "created_at": "2026-06-16T17:12:02.059593+00:00", - "expires_at": "2026-06-23T17:12:02.059593+00:00", + "created_at": "2026-06-16 17:12:02.059593+00", + "expires_at": "2026-06-23 17:12:02.059593+00", } ) @@ -84,8 +84,8 @@ def test_domain_claims_get(self) -> None: "region": "us-east-1", "blocked_reason": "grace_period", "failure_reason": None, - "created_at": "2026-06-16T17:12:02.059593+00:00", - "expires_at": "2026-06-23T17:12:02.059593+00:00", + "created_at": "2026-06-16 17:12:02.059593+00", + "expires_at": "2026-06-23 17:12:02.059593+00", } ) diff --git a/tests/domains_async_test.py b/tests/domains_async_test.py index 2db4ac4..c9f900b 100644 --- a/tests/domains_async_test.py +++ b/tests/domains_async_test.py @@ -15,7 +15,7 @@ async def test_domains_create_async(self) -> None: { "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "name": "example.com", - "created_at": "2023-03-28T17:12:02.059593+00:00", + "created_at": "2023-03-28 17:12:02.059593+00", "status": "not_started", "records": [ { @@ -73,7 +73,7 @@ async def test_domains_create_async(self) -> None: assert domain["id"] == "4dd369bc-aa82-4ff3-97de-514ae3000ee0" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-03-28T17:12:02.059593+00:00" + assert domain["created_at"] == "2023-03-28 17:12:02.059593+00" assert domain["region"] == "us-east-1" async def test_should_create_domains_async_raise_exception_when_no_content( @@ -93,7 +93,7 @@ async def test_domains_get_async(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ) @@ -104,7 +104,7 @@ async def test_domains_get_async(self) -> None: assert domain["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domain["created_at"] == "2023-04-26 20:21:26.347412+00" assert domain["region"] == "us-east-1" async def test_should_get_domains_async_raise_exception_when_no_content( @@ -124,7 +124,7 @@ async def test_domains_list_async(self) -> None: "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "name": "example.com", "status": "not_started", - "created_at": "2023-03-28T17:12:02.059593+00:00", + "created_at": "2023-03-28 17:12:02.059593+00", "region": "us-east-1", } ] @@ -136,7 +136,7 @@ async def test_domains_list_async(self) -> None: assert domain["id"] == "4dd369bc-aa82-4ff3-97de-514ae3000ee0" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-03-28T17:12:02.059593+00:00" + assert domain["created_at"] == "2023-03-28 17:12:02.059593+00" assert domain["region"] == "us-east-1" async def test_should_list_domains_async_raise_exception_when_no_content( @@ -151,7 +151,7 @@ async def test_domains_create_async_with_tracking_subdomain(self) -> None: { "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "name": "example.com", - "created_at": "2023-03-28T17:12:02.059593+00:00", + "created_at": "2023-03-28 17:12:02.059593+00", "status": "not_started", "open_tracking": True, "click_tracking": True, @@ -220,7 +220,7 @@ async def test_domains_get_async_with_tracking_fields(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", "open_tracking": True, "click_tracking": True, @@ -267,7 +267,7 @@ async def test_domains_update_async(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ) @@ -282,7 +282,7 @@ async def test_domains_update_async(self) -> None: assert domain["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domain["created_at"] == "2023-04-26 20:21:26.347412+00" assert domain["region"] == "us-east-1" async def test_domains_update_async_with_tracking_subdomain(self) -> None: @@ -318,7 +318,7 @@ async def test_domains_remove_async(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ) @@ -329,7 +329,7 @@ async def test_domains_remove_async(self) -> None: assert domain["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domain["created_at"] == "2023-04-26 20:21:26.347412+00" assert domain["region"] == "us-east-1" async def test_should_remove_domains_async_raise_exception_when_no_content( @@ -348,7 +348,7 @@ async def test_domains_verify_async(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "verified", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ) @@ -359,7 +359,7 @@ async def test_domains_verify_async(self) -> None: assert domain["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domain["name"] == "example.com" assert domain["status"] == "verified" - assert domain["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domain["created_at"] == "2023-04-26 20:21:26.347412+00" assert domain["region"] == "us-east-1" async def test_should_verify_domains_async_raise_exception_when_no_content( diff --git a/tests/domains_test.py b/tests/domains_test.py index 8694662..53ae913 100644 --- a/tests/domains_test.py +++ b/tests/domains_test.py @@ -11,7 +11,7 @@ def test_domains_create(self) -> None: { "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "name": "example.com", - "created_at": "2023-03-28T17:12:02.059593+00:00", + "created_at": "2023-03-28 17:12:02.059593+00", "status": "not_started", "records": [ { @@ -71,7 +71,7 @@ def test_domains_create(self) -> None: assert domain["id"] == "4dd369bc-aa82-4ff3-97de-514ae3000ee0" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-03-28T17:12:02.059593+00:00" + assert domain["created_at"] == "2023-03-28 17:12:02.059593+00" assert domain["region"] == "us-east-1" def test_should_create_domains_raise_exception_when_no_content(self) -> None: @@ -89,7 +89,7 @@ def test_domains_get(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ) @@ -100,7 +100,7 @@ def test_domains_get(self) -> None: assert domain["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domain["name"] == "example.com" assert domain["status"] == "not_started" - assert domain["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domain["created_at"] == "2023-04-26 20:21:26.347412+00" assert domain["region"] == "us-east-1" def test_should_get_domains_raise_exception_when_no_content(self) -> None: @@ -120,7 +120,7 @@ def test_domains_list(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", } ], @@ -133,7 +133,7 @@ def test_domains_list(self) -> None: assert domains["data"][0]["id"] == "d91cd9bd-1176-453e-8fc1-35364d380206" assert domains["data"][0]["name"] == "example.com" assert domains["data"][0]["status"] == "not_started" - assert domains["data"][0]["created_at"] == "2023-04-26T20:21:26.347412+00:00" + assert domains["data"][0]["created_at"] == "2023-04-26 20:21:26.347412+00" assert domains["data"][0]["region"] == "us-east-1" def test_should_list_domains_raise_exception_when_no_content(self) -> None: @@ -185,7 +185,7 @@ def test_domains_create_with_tracking_subdomain(self) -> None: { "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "name": "example.com", - "created_at": "2023-03-28T17:12:02.059593+00:00", + "created_at": "2023-03-28 17:12:02.059593+00", "status": "not_started", "open_tracking": True, "click_tracking": True, @@ -256,7 +256,7 @@ def test_domains_get_with_tracking_fields(self) -> None: "id": "d91cd9bd-1176-453e-8fc1-35364d380206", "name": "example.com", "status": "not_started", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", "open_tracking": True, "click_tracking": True, @@ -348,14 +348,14 @@ def test_domains_list_with_pagination_params(self) -> None: "id": "domain-1", "name": "example1.com", "status": "verified", - "created_at": "2023-04-26T20:21:26.347412+00:00", + "created_at": "2023-04-26 20:21:26.347412+00", "region": "us-east-1", }, { "id": "domain-2", "name": "example2.com", "status": "not_started", - "created_at": "2023-04-27T20:21:26.347412+00:00", + "created_at": "2023-04-27 20:21:26.347412+00", "region": "us-west-2", }, ], @@ -380,7 +380,7 @@ def test_domains_list_with_before_param(self) -> None: "id": "domain-3", "name": "example3.com", "status": "verified", - "created_at": "2023-04-25T20:21:26.347412+00:00", + "created_at": "2023-04-25 20:21:26.347412+00", "region": "eu-west-1", } ], diff --git a/tests/emails_test.py b/tests/emails_test.py index cc94caa..b7f492b 100644 --- a/tests/emails_test.py +++ b/tests/emails_test.py @@ -43,7 +43,7 @@ def test_email_get(self) -> None: "message_id": "<111-222-333@email.example.com>", "to": ["james@bond.com"], "from": "onboarding@resend.dev", - "created_at": "2023-04-03T22:13:42.674981+00:00", + "created_at": "2023-04-03 22:13:42.674981+00", "subject": "Hello World", "html": "Congrats on sending your first email!", "text": None, @@ -150,7 +150,7 @@ def test_email_list(self) -> None: "message_id": "<111-222-333@email.example.com>", "to": ["james@bond.com"], "from": "onboarding@resend.dev", - "created_at": "2023-04-03T22:13:42.674981+00:00", + "created_at": "2023-04-03 22:13:42.674981+00", "subject": "Hello World", "html": "Congrats on sending your first email!", "text": None, @@ -164,7 +164,7 @@ def test_email_list(self) -> None: "message_id": "<222-333-444@email.example.com>", "to": ["test@example.com"], "from": "hello@resend.dev", - "created_at": "2023-04-04T10:15:42.674981+00:00", + "created_at": "2023-04-04 10:15:42.674981+00", "subject": "Test Email", "html": "This is a test email", "text": "This is a test email", @@ -195,7 +195,7 @@ def test_email_list_with_params(self) -> None: "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c", "to": ["james@bond.com"], "from": "onboarding@resend.dev", - "created_at": "2023-04-03T22:13:42.674981+00:00", + "created_at": "2023-04-03 22:13:42.674981+00", "subject": "Hello World", "html": "Congrats on sending your first email!", "text": None, @@ -248,7 +248,7 @@ def test_receiving_get(self) -> None: "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "to": ["received@example.com"], "from": "sender@example.com", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "subject": "Test inbound email", "html": "

hello world

", "text": "hello world", @@ -296,7 +296,7 @@ def test_receiving_get_with_no_attachments(self) -> None: "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "to": ["received@example.com"], "from": "sender@example.com", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "subject": "Test inbound email", "html": None, "text": "hello world", @@ -328,7 +328,7 @@ def test_receiving_get_with_nullable_attachment_fields(self) -> None: "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "to": ["received@example.com"], "from": "sender@example.com", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "subject": "Signed inbound email", "html": None, "text": "hello world", @@ -380,7 +380,7 @@ def test_receiving_get_with_html_format_cid(self) -> None: "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "to": ["received@example.com"], "from": "sender@example.com", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "subject": "Test inbound email", "html": '', "text": "hello world", @@ -408,7 +408,7 @@ def test_receiving_get_with_html_format_data_uri(self) -> None: "id": "67d9bcdb-5a02-42d7-8da9-0d6feea18cff", "to": ["received@example.com"], "from": "sender@example.com", - "created_at": "2023-04-07T23:13:52.669661+00:00", + "created_at": "2023-04-07 23:13:52.669661+00", "subject": "Test inbound email", "html": '', "text": "hello world", @@ -620,7 +620,7 @@ def test_receiving_get_email_headers_not_overwritten_by_http_headers(self) -> No mock_client.request.return_value = ( b'{"object":"inbound","id":"67d9bcdb-5a02-42d7-8da9-0d6feea18cff",' b'"to":["received@example.com"],"from":"sender@example.com",' - b'"created_at":"2023-04-07T23:13:52.669661+00:00","subject":"Test",' + b'"created_at":"2023-04-07 23:13:52.669661+00","subject":"Test",' b'"html":null,"text":"hello","bcc":null,"cc":null,"reply_to":null,' b'"message_id":"","headers":{"X-Custom":"email-value"},' b'"attachments":[]}', diff --git a/tests/events_async_test.py b/tests/events_async_test.py index 6c1e765..064cf53 100644 --- a/tests/events_async_test.py +++ b/tests/events_async_test.py @@ -38,7 +38,7 @@ async def test_events_get_async(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": {"plan": "string"}, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, } ) @@ -129,7 +129,7 @@ async def test_events_list_async(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": None, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, }, ], diff --git a/tests/events_test.py b/tests/events_test.py index d6e3514..c543917 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -46,7 +46,7 @@ def test_events_get_by_id(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": {"plan": "string"}, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, } ) @@ -56,7 +56,7 @@ def test_events_get_by_id(self) -> None: assert event["id"] == "56261eea-8f8b-4381-83c6-79fa7120f1cf" assert event["name"] == "user.signed_up" assert event["schema"] == {"plan": "string"} - assert event["created_at"] == "2024-01-01T00:00:00.000Z" + assert event["created_at"] == "2024-01-01 00:00:00+00" assert event["updated_at"] is None def test_events_get_by_name(self) -> None: @@ -66,7 +66,7 @@ def test_events_get_by_name(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": None, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, } ) @@ -189,15 +189,15 @@ def test_events_list(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": {"plan": "string"}, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, }, { "id": "67372ffb-9g9c-5492-94d7-80gb8231g2dg", "name": "user.upgraded", "schema": None, - "created_at": "2024-02-01T00:00:00.000Z", - "updated_at": "2024-02-15T00:00:00.000Z", + "created_at": "2024-02-01 00:00:00+00", + "updated_at": "2024-02-15 00:00:00+00", }, ], } @@ -217,7 +217,7 @@ def test_events_list(self) -> None: second = events["data"][1] assert second["name"] == "user.upgraded" assert second["schema"] is None - assert second["updated_at"] == "2024-02-15T00:00:00.000Z" + assert second["updated_at"] == "2024-02-15 00:00:00+00" def test_events_list_with_pagination_params(self) -> None: self.set_mock_json( @@ -229,7 +229,7 @@ def test_events_list_with_pagination_params(self) -> None: "id": "56261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "user.signed_up", "schema": None, - "created_at": "2024-01-01T00:00:00.000Z", + "created_at": "2024-01-01 00:00:00+00", "updated_at": None, } ], diff --git a/tests/logs_async_test.py b/tests/logs_async_test.py index 3883454..494c55b 100644 --- a/tests/logs_async_test.py +++ b/tests/logs_async_test.py @@ -15,7 +15,7 @@ async def test_logs_get_async(self) -> None: { "object": "log", "id": "37e4414c-5e25-4dbc-a071-43552a4bd53b", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, @@ -49,7 +49,7 @@ async def test_logs_list_async(self) -> None: "data": [ { "id": "37e4414c-5e25-4dbc-a071-43552a4bd53b", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, @@ -81,7 +81,7 @@ async def test_logs_list_async_with_pagination_params(self) -> None: "data": [ { "id": "log-id-1", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, diff --git a/tests/logs_test.py b/tests/logs_test.py index 3a7ba8b..39e88eb 100644 --- a/tests/logs_test.py +++ b/tests/logs_test.py @@ -11,7 +11,7 @@ def test_logs_get(self) -> None: { "object": "log", "id": "37e4414c-5e25-4dbc-a071-43552a4bd53b", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, @@ -26,7 +26,7 @@ def test_logs_get(self) -> None: ) assert log["object"] == "log" assert log["id"] == "37e4414c-5e25-4dbc-a071-43552a4bd53b" - assert log["created_at"] == "2024-01-01T00:00:00.000000+00:00" + assert log["created_at"] == "2024-01-01 00:00:00+00" assert log["endpoint"] == "/emails" assert log["method"] == "POST" assert log["response_status"] == 200 @@ -47,7 +47,7 @@ def test_logs_list(self) -> None: "data": [ { "id": "37e4414c-5e25-4dbc-a071-43552a4bd53b", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, @@ -63,7 +63,7 @@ def test_logs_list(self) -> None: assert len(logs["data"]) == 1 log = logs["data"][0] assert log["id"] == "37e4414c-5e25-4dbc-a071-43552a4bd53b" - assert log["created_at"] == "2024-01-01T00:00:00.000000+00:00" + assert log["created_at"] == "2024-01-01 00:00:00+00" assert log["endpoint"] == "/emails" assert log["method"] == "POST" assert log["response_status"] == 200 @@ -82,7 +82,7 @@ def test_logs_list_with_pagination_params(self) -> None: "data": [ { "id": "log-id-1", - "created_at": "2024-01-01T00:00:00.000000+00:00", + "created_at": "2024-01-01 00:00:00+00", "endpoint": "/emails", "method": "POST", "response_status": 200, @@ -90,7 +90,7 @@ def test_logs_list_with_pagination_params(self) -> None: }, { "id": "log-id-2", - "created_at": "2024-01-02T00:00:00.000000+00:00", + "created_at": "2024-01-02 00:00:00+00", "endpoint": "/domains", "method": "GET", "response_status": 200, @@ -116,7 +116,7 @@ def test_logs_list_with_before_param(self) -> None: "data": [ { "id": "log-id-3", - "created_at": "2024-01-03T00:00:00.000000+00:00", + "created_at": "2024-01-03 00:00:00+00", "endpoint": "/api-keys", "method": "DELETE", "response_status": 200, diff --git a/tests/oauth_grants_async_test.py b/tests/oauth_grants_async_test.py index 2ea82a4..0dc0472 100644 --- a/tests/oauth_grants_async_test.py +++ b/tests/oauth_grants_async_test.py @@ -20,7 +20,7 @@ async def test_oauth_grants_list_async(self) -> None: "id": "650e8400-e29b-41d4-a716-446655440001", "client_id": "430eed87-632a-4ea6-90db-0aace67ec228", "scopes": ["emails:send"], - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "revoked_at": None, "revoked_reason": None, "client": { diff --git a/tests/oauth_grants_test.py b/tests/oauth_grants_test.py index 031b45b..e09fa72 100644 --- a/tests/oauth_grants_test.py +++ b/tests/oauth_grants_test.py @@ -16,7 +16,7 @@ def test_oauth_grants_list(self) -> None: "id": "650e8400-e29b-41d4-a716-446655440001", "client_id": "430eed87-632a-4ea6-90db-0aace67ec228", "scopes": ["emails:send"], - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "revoked_at": None, "revoked_reason": None, "client": { @@ -35,7 +35,7 @@ def test_oauth_grants_list(self) -> None: assert grant["id"] == "650e8400-e29b-41d4-a716-446655440001" assert grant["client_id"] == "430eed87-632a-4ea6-90db-0aace67ec228" assert grant["scopes"] == ["emails:send"] - assert grant["created_at"] == "2023-06-21T06:10:36.144Z" + assert grant["created_at"] == "2023-06-21 06:10:36.144+00" assert grant["revoked_at"] is None assert grant["revoked_reason"] is None assert grant["client"]["name"] == "Resend CLI" @@ -51,8 +51,8 @@ def test_oauth_grants_list_revoked_grant(self) -> None: "id": "650e8400-e29b-41d4-a716-446655440002", "client_id": "430eed87-632a-4ea6-90db-0aace67ec228", "scopes": ["emails:send", "domains:read"], - "created_at": "2023-06-20T06:10:36.144Z", - "revoked_at": "2023-06-22T06:10:36.144Z", + "created_at": "2023-06-20 06:10:36.144+00", + "revoked_at": "2023-06-22 06:10:36.144+00", "revoked_reason": "revoked_from_api", "client": { "name": "Resend CLI", @@ -65,7 +65,7 @@ def test_oauth_grants_list_revoked_grant(self) -> None: grants: resend.OAuthGrants.ListResponse = resend.OAuthGrants.list() grant = grants["data"][0] - assert grant["revoked_at"] == "2023-06-22T06:10:36.144Z" + assert grant["revoked_at"] == "2023-06-22 06:10:36.144+00" assert grant["revoked_reason"] == "revoked_from_api" assert grant["client"]["logo_uri"] is None @@ -84,7 +84,7 @@ def test_oauth_grants_list_with_pagination_params(self) -> None: "id": "grant-1", "client_id": "client-1", "scopes": ["emails:send"], - "created_at": "2023-06-21T06:10:36.144Z", + "created_at": "2023-06-21 06:10:36.144+00", "revoked_at": None, "revoked_reason": None, "client": {"name": "Resend CLI", "logo_uri": None}, @@ -93,7 +93,7 @@ def test_oauth_grants_list_with_pagination_params(self) -> None: "id": "grant-2", "client_id": "client-1", "scopes": ["emails:send"], - "created_at": "2023-06-20T06:10:36.144Z", + "created_at": "2023-06-20 06:10:36.144+00", "revoked_at": None, "revoked_reason": None, "client": {"name": "Resend CLI", "logo_uri": None}, @@ -123,7 +123,7 @@ def test_oauth_grants_list_with_before_param(self) -> None: "id": "grant-3", "client_id": "client-1", "scopes": ["emails:send"], - "created_at": "2023-06-19T06:10:36.144Z", + "created_at": "2023-06-19 06:10:36.144+00", "revoked_at": None, "revoked_reason": None, "client": {"name": "Resend CLI", "logo_uri": None}, diff --git a/tests/receiving_async_test.py b/tests/receiving_async_test.py index 5b7dfb5..ff210a8 100644 --- a/tests/receiving_async_test.py +++ b/tests/receiving_async_test.py @@ -19,7 +19,7 @@ async def test_receiving_get_async(self) -> None: "from": "sender@example.com", "to": ["recipient@example.com"], "subject": "Test subject", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", "received_for": ["forwarded@example.com"], } ) @@ -39,7 +39,7 @@ async def test_receiving_get_async_with_html_format_cid(self) -> None: "from": "sender@example.com", "to": ["recipient@example.com"], "subject": "Test subject", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", } ) @@ -61,7 +61,7 @@ async def test_receiving_get_async_with_html_format_data_uri(self) -> None: "from": "sender@example.com", "to": ["recipient@example.com"], "subject": "Test subject", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", } ) @@ -95,7 +95,7 @@ async def test_receiving_list_async(self) -> None: "from": "sender@example.com", "to": ["recipient@example.com"], "subject": "Test subject", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", } ], } @@ -126,7 +126,7 @@ async def test_receiving_attachments_get_async(self) -> None: "content_disposition": "inline", "content_id": "img001", "download_url": "https://inbound-cdn.resend.com/test/attachments/test-id", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", } ) @@ -164,7 +164,7 @@ async def test_receiving_attachments_list_async(self) -> None: "content_id": "img001", "size": 1024, "download_url": "https://inbound-cdn.resend.com/test/attachments/2a0c9ce0?signature=sig-123", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, { "id": "3b1d0df1-4223-5839-a87f-58eecd27b429", @@ -173,7 +173,7 @@ async def test_receiving_attachments_list_async(self) -> None: "content_disposition": "attachment", "size": 2048, "download_url": "https://inbound-cdn.resend.com/test/attachments/3b1d0df1?signature=sig-456", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, ], } diff --git a/tests/response_test.py b/tests/response_test.py index 32e1d34..ae9b693 100644 --- a/tests/response_test.py +++ b/tests/response_test.py @@ -19,7 +19,7 @@ def test_list_response_supports_dict_access(self) -> None: "content_disposition": "inline", "size": 1024, "download_url": "https://cdn.resend.com/att-1", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, ], } @@ -45,7 +45,7 @@ def test_list_response_supports_attribute_access(self) -> None: "content_disposition": "inline", "size": 1024, "download_url": "https://cdn.resend.com/att-1", - "expires_at": "2025-10-17T14:29:41.521Z", + "expires_at": "2025-10-17 14:29:41.521+00", }, ], } diff --git a/tests/segments_test.py b/tests/segments_test.py index baf3122..7f3c9fa 100644 --- a/tests/segments_test.py +++ b/tests/segments_test.py @@ -36,14 +36,14 @@ def test_segments_get(self) -> None: "object": "audience", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ) segment = resend.Segments.get(id="78261eea-8f8b-4381-83c6-79fa7120f1cf") assert segment["id"] == "78261eea-8f8b-4381-83c6-79fa7120f1cf" assert segment["name"] == "Registered Users" - assert segment["created_at"] == "2023-10-06T22:59:55.977Z" + assert segment["created_at"] == "2023-10-06 22:59:55.977+00" def test_should_get_segments_raise_exception_when_no_content(self) -> None: self.set_mock_json(None) @@ -80,7 +80,7 @@ def test_segments_list(self) -> None: { "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Registered Users", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", } ], } @@ -106,12 +106,12 @@ def test_segments_list_with_pagination_params(self) -> None: { "id": "segment-1", "name": "First Segment", - "created_at": "2023-10-06T22:59:55.977Z", + "created_at": "2023-10-06 22:59:55.977+00", }, { "id": "segment-2", "name": "Second Segment", - "created_at": "2023-10-07T22:59:55.977Z", + "created_at": "2023-10-07 22:59:55.977+00", }, ], } @@ -137,7 +137,7 @@ def test_segments_list_with_before_param(self) -> None: { "id": "segment-3", "name": "Third Segment", - "created_at": "2023-10-05T22:59:55.977Z", + "created_at": "2023-10-05 22:59:55.977+00", } ], } diff --git a/tests/suppressions_async_test.py b/tests/suppressions_async_test.py index ba28c69..7828319 100644 --- a/tests/suppressions_async_test.py +++ b/tests/suppressions_async_test.py @@ -45,14 +45,14 @@ async def test_suppressions_list_async(self) -> None: "email": "bounced@example.com", "origin": "bounce", "source_id": "479e3145-dd38-476b-932c-529ceb705947", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", }, { "id": "fd61172c-cafc-40f5-b049-b45947779a29", "email": "manual@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-07T23:47:56.678Z", + "created_at": "2023-10-07 23:47:56.678+00", }, ], } @@ -98,7 +98,7 @@ async def test_suppressions_get_async(self) -> None: "email": "bounced@example.com", "origin": "bounce", "source_id": "479e3145-dd38-476b-932c-529ceb705947", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) @@ -117,7 +117,7 @@ async def test_suppressions_get_async_with_null_source_id(self) -> None: "email": "manual@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) @@ -133,7 +133,7 @@ async def test_suppressions_get_async_encodes_email_identifier(self) -> None: "email": "user+tag@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) diff --git a/tests/suppressions_test.py b/tests/suppressions_test.py index 0b37133..4ffe655 100644 --- a/tests/suppressions_test.py +++ b/tests/suppressions_test.py @@ -43,14 +43,14 @@ def test_suppressions_list(self) -> None: "email": "bounced@example.com", "origin": "bounce", "source_id": "479e3145-dd38-476b-932c-529ceb705947", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", }, { "id": "fd61172c-cafc-40f5-b049-b45947779a29", "email": "manual@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-07T23:47:56.678Z", + "created_at": "2023-10-07 23:47:56.678+00", }, ], } @@ -65,7 +65,7 @@ def test_suppressions_list(self) -> None: assert bounced["email"] == "bounced@example.com" assert bounced["origin"] == "bounce" assert bounced["source_id"] == "479e3145-dd38-476b-932c-529ceb705947" - assert bounced["created_at"] == "2023-10-06T23:47:56.678Z" + assert bounced["created_at"] == "2023-10-06 23:47:56.678+00" manual = suppressions["data"][1] assert manual["origin"] == "manual" @@ -82,7 +82,7 @@ def test_suppressions_list_entries_have_no_object_field(self) -> None: "email": "bounced@example.com", "origin": "bounce", "source_id": "479e3145-dd38-476b-932c-529ceb705947", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ], } @@ -126,7 +126,7 @@ def test_suppressions_get(self) -> None: "email": "bounced@example.com", "origin": "bounce", "source_id": "479e3145-dd38-476b-932c-529ceb705947", - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) @@ -147,7 +147,7 @@ def test_suppressions_get_with_null_source_id(self) -> None: "email": "manual@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) @@ -163,7 +163,7 @@ def test_suppressions_get_encodes_email_identifier(self) -> None: "email": "user+tag@example.com", "origin": "manual", "source_id": None, - "created_at": "2023-10-06T23:47:56.678Z", + "created_at": "2023-10-06 23:47:56.678+00", } ) diff --git a/tests/templates_async_test.py b/tests/templates_async_test.py index 66b5e59..75f8129 100644 --- a/tests/templates_async_test.py +++ b/tests/templates_async_test.py @@ -72,9 +72,9 @@ async def test_templates_get_async(self) -> None: "fallback_value": 25, }, ], - "created_at": "2024-01-15T10:30:00.000Z", - "updated_at": "2024-01-15T10:30:00.000Z", - "published_at": "2024-01-15T11:00:00.000Z", + "created_at": "2024-01-15 10:30:00+00", + "updated_at": "2024-01-15 10:30:00+00", + "published_at": "2024-01-15 11:00:00+00", } ) @@ -196,9 +196,9 @@ async def test_templates_list_async(self) -> None: "id": "template-1", "name": "welcome-email", "status": "published", - "published_at": "2024-01-15T11:00:00.000Z", - "created_at": "2024-01-15T10:30:00.000Z", - "updated_at": "2024-01-15T10:30:00.000Z", + "published_at": "2024-01-15 11:00:00+00", + "created_at": "2024-01-15 10:30:00+00", + "updated_at": "2024-01-15 10:30:00+00", "alias": "welcome", } ], diff --git a/tests/templates_test.py b/tests/templates_test.py index ca1550d..f2f598b 100644 --- a/tests/templates_test.py +++ b/tests/templates_test.py @@ -79,9 +79,9 @@ def test_templates_get(self) -> None: "fallback_value": 25, }, ], - "created_at": "2024-01-15T10:30:00.000Z", - "updated_at": "2024-01-15T10:30:00.000Z", - "published_at": "2024-01-15T11:00:00.000Z", + "created_at": "2024-01-15 10:30:00+00", + "updated_at": "2024-01-15 10:30:00+00", + "published_at": "2024-01-15 11:00:00+00", } ) @@ -105,9 +105,9 @@ def test_templates_get(self) -> None: assert template["variables"][1]["key"] == "AGE" assert template["variables"][1]["type"] == "number" assert template["variables"][1]["fallback_value"] == 25 - assert template["created_at"] == "2024-01-15T10:30:00.000Z" - assert template["updated_at"] == "2024-01-15T10:30:00.000Z" - assert template["published_at"] == "2024-01-15T11:00:00.000Z" + assert template["created_at"] == "2024-01-15 10:30:00+00" + assert template["updated_at"] == "2024-01-15 10:30:00+00" + assert template["published_at"] == "2024-01-15 11:00:00+00" def test_templates_update(self) -> None: self.set_mock_json( @@ -171,9 +171,9 @@ def test_templates_list(self) -> None: "id": "template-1", "name": "welcome-email", "status": "published", - "published_at": "2024-01-15T11:00:00.000Z", - "created_at": "2024-01-15T10:30:00.000Z", - "updated_at": "2024-01-15T10:30:00.000Z", + "published_at": "2024-01-15 11:00:00+00", + "created_at": "2024-01-15 10:30:00+00", + "updated_at": "2024-01-15 10:30:00+00", "alias": "welcome", }, { @@ -181,8 +181,8 @@ def test_templates_list(self) -> None: "name": "goodbye-email", "status": "draft", "published_at": None, - "created_at": "2024-01-16T10:30:00.000Z", - "updated_at": "2024-01-16T10:30:00.000Z", + "created_at": "2024-01-16 10:30:00+00", + "updated_at": "2024-01-16 10:30:00+00", "alias": "goodbye", }, ], @@ -198,9 +198,9 @@ def test_templates_list(self) -> None: assert template["id"] == "template-1" assert template["name"] == "welcome-email" assert template["status"] == "published" - assert template["published_at"] == "2024-01-15T11:00:00.000Z" - assert template["created_at"] == "2024-01-15T10:30:00.000Z" - assert template["updated_at"] == "2024-01-15T10:30:00.000Z" + assert template["published_at"] == "2024-01-15 11:00:00+00" + assert template["created_at"] == "2024-01-15 10:30:00+00" + assert template["updated_at"] == "2024-01-15 10:30:00+00" assert template["alias"] == "welcome" template = templates["data"][1] @@ -208,8 +208,8 @@ def test_templates_list(self) -> None: assert template["name"] == "goodbye-email" assert template["status"] == "draft" assert template["published_at"] is None - assert template["created_at"] == "2024-01-16T10:30:00.000Z" - assert template["updated_at"] == "2024-01-16T10:30:00.000Z" + assert template["created_at"] == "2024-01-16 10:30:00+00" + assert template["updated_at"] == "2024-01-16 10:30:00+00" assert template["alias"] == "goodbye" def test_templates_list_with_pagination_params(self) -> None: @@ -222,9 +222,9 @@ def test_templates_list_with_pagination_params(self) -> None: "id": "template-1", "name": "welcome-email", "status": "published", - "published_at": "2024-01-15T11:00:00.000Z", - "created_at": "2024-01-15T10:30:00.000Z", - "updated_at": "2024-01-15T10:30:00.000Z", + "published_at": "2024-01-15 11:00:00+00", + "created_at": "2024-01-15 10:30:00+00", + "updated_at": "2024-01-15 10:30:00+00", "alias": "welcome", } ], @@ -252,8 +252,8 @@ def test_templates_list_with_before_param(self) -> None: "name": "password-reset", "status": "draft", "published_at": None, - "created_at": "2024-01-14T10:30:00.000Z", - "updated_at": "2024-01-14T10:30:00.000Z", + "created_at": "2024-01-14 10:30:00+00", + "updated_at": "2024-01-14 10:30:00+00", "alias": "password-reset", } ], diff --git a/tests/topics_async_test.py b/tests/topics_async_test.py index 073662e..9ea0d88 100644 --- a/tests/topics_async_test.py +++ b/tests/topics_async_test.py @@ -42,7 +42,7 @@ async def test_topics_get_async(self) -> None: "name": "Weekly Newsletter", "description": "Weekly newsletter for our subscribers", "default_subscription": "opt_in", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", } ) @@ -121,7 +121,7 @@ async def test_topics_list_async(self) -> None: "name": "Weekly Newsletter", "description": "Weekly newsletter for our subscribers", "default_subscription": "opt_in", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", } ], } diff --git a/tests/topics_test.py b/tests/topics_test.py index 7c0dc96..8099c85 100644 --- a/tests/topics_test.py +++ b/tests/topics_test.py @@ -51,7 +51,7 @@ def test_topics_get(self) -> None: "name": "Weekly Newsletter", "description": "Weekly newsletter for our subscribers", "default_subscription": "opt_in", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", } ) @@ -60,7 +60,7 @@ def test_topics_get(self) -> None: assert topic["name"] == "Weekly Newsletter" assert topic["description"] == "Weekly newsletter for our subscribers" assert topic["default_subscription"] == "opt_in" - assert topic["created_at"] == "2023-04-08T00:11:13.110779+00:00" + assert topic["created_at"] == "2023-04-08 00:11:13.110779+00" def test_should_get_topics_raise_exception_when_no_content(self) -> None: self.set_mock_json(None) @@ -155,7 +155,7 @@ def test_topics_list(self) -> None: "name": "Weekly Newsletter", "description": "Weekly newsletter for our subscribers", "default_subscription": "opt_in", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", } ], } @@ -187,14 +187,14 @@ def test_topics_list_with_pagination_params(self) -> None: "name": "First Topic", "description": "First topic description", "default_subscription": "opt_in", - "created_at": "2023-04-08T00:11:13.110779+00:00", + "created_at": "2023-04-08 00:11:13.110779+00", }, { "id": "topic-2", "name": "Second Topic", "description": "Second topic description", "default_subscription": "opt_out", - "created_at": "2023-04-09T00:11:13.110779+00:00", + "created_at": "2023-04-09 00:11:13.110779+00", }, ], } @@ -222,7 +222,7 @@ def test_topics_list_with_before_param(self) -> None: "name": "Third Topic", "description": "Third topic description", "default_subscription": "opt_in", - "created_at": "2023-04-07T00:11:13.110779+00:00", + "created_at": "2023-04-07 00:11:13.110779+00", } ], } diff --git a/tests/webhooks_async_test.py b/tests/webhooks_async_test.py index 84b0516..4109caf 100644 --- a/tests/webhooks_async_test.py +++ b/tests/webhooks_async_test.py @@ -43,7 +43,7 @@ async def test_webhooks_get_async(self) -> None: { "id": "wh_123", "object": "webhook", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", "status": "enabled", "endpoint": "https://example.com/webhook", "events": ["email.sent"], @@ -93,7 +93,7 @@ async def test_webhooks_list_async(self) -> None: { "id": "wh_123", "object": "webhook", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", "status": "enabled", "endpoint": "https://example.com/webhook", "events": ["email.sent"], diff --git a/tests/webhooks_test.py b/tests/webhooks_test.py index 45fbe73..f82ec20 100644 --- a/tests/webhooks_test.py +++ b/tests/webhooks_test.py @@ -32,7 +32,7 @@ def test_webhooks_get(self) -> None: webhook_response = { "id": "wh_123", "object": "webhook", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", "status": "enabled", "endpoint": "https://example.com/webhook", "events": ["email.sent"], @@ -65,7 +65,7 @@ def test_webhooks_list(self) -> None: { "id": "wh_123", "object": "webhook", - "created_at": "2024-01-01T00:00:00Z", + "created_at": "2024-01-01 00:00:00+00", "status": "enabled", "endpoint": "https://example.com/webhook", "events": ["email.sent"], @@ -119,7 +119,7 @@ def test_verify_valid_webhook(self) -> None: '{"type":"email.sent","created_at":"2026-02-22T23:41:12.126Z",' '"data":{"email_id":"123","message_id":"<111@example.com>",' '"from":"Acme ","to":["delivered@resend.dev"],' - '"subject":"Hello","created_at":"2026-02-22T23:41:11.894719+00:00"}}' + '"subject":"Hello","created_at":"2026-02-22T23:41:11.894Z"}}' ) signature = self._generate_test_signature(secret, msg_id, timestamp, payload) @@ -299,7 +299,7 @@ def test_verify_returns_received_email_payload(self) -> None: timestamp = str(int(time.time())) payload = ( '{"type":"email.received","created_at":"2026-02-22T23:41:12.126Z",' - '"data":{"email_id":"567","created_at":"2026-02-22T23:41:11.894719+00:00",' + '"data":{"email_id":"567","created_at":"2026-02-22T23:41:11.894Z",' '"from":"onboarding@resend.dev","to":["delivered@resend.dev"],' '"bcc":[],"cc":[],"received_for":["forwarded@example.com"],' '"message_id":"<111-222-333@email.example.com>",' @@ -331,7 +331,7 @@ def test_verify_returns_bounced_payload(self) -> None: '{"type":"email.bounced","created_at":"2026-02-22T23:41:12.126Z",' '"data":{"email_id":"123","message_id":"<111@example.com>",' '"from":"Acme ","to":["bounced@resend.dev"],' - '"subject":"Hello","created_at":"2026-02-22T23:41:11.894719+00:00",' + '"subject":"Hello","created_at":"2026-02-22T23:41:11.894Z",' '"bounce":{"diagnosticCode":"smtp; 550 5.1.1 user unknown",' '"message":"The recipient does not exist.",' '"subType":"General","type":"Permanent"}}}'