diff --git a/eventtracking/backends/tests/test_event_bus.py b/eventtracking/backends/tests/test_event_bus.py index 83bb6f5..e5fb59a 100644 --- a/eventtracking/backends/tests/test_event_bus.py +++ b/eventtracking/backends/tests/test_event_bus.py @@ -11,6 +11,7 @@ from eventtracking.backends.event_bus import EventBusRoutingBackend +from datetime import datetime class TestAsyncRoutingBackend(TestCase): """ @@ -51,7 +52,7 @@ def test_successful_send_event(self, mock_get_producer): "event_data": { "tracking_log": TrackingLogData( name=self.sample_event["name"], - timestamp=self.sample_event["timestamp"], + timestamp=datetime.strptime(self.sample_event["timestamp"], "%Y-%m-%dT%H:%M:%S.%f%z"), data=json.dumps(self.sample_event["data"]), context=json.dumps(self.sample_event["context"]), )