Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix integration tests for Celery 5.4.0
Fix the following error: ``` ____ TestCeleryUserRateLimitIntegrationNoLimit.test_mock_pass_user_id_task _____ self = <integration.test_celery_user_rate_limit.TestCeleryUserRateLimitIntegrationNoLimit object at 0x7f978fc0e400> def test_mock_pass_user_id_task(self): > self._test_mock_pass_user_id_task(2, 3, self._user_rate_limit) test/integration/test_celery_user_rate_limit.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <integration.test_celery_user_rate_limit.TestCeleryUserRateLimitIntegrationNoLimit object at 0x7f978fc0e400> num_users = 2, num_calls = 3, tasks_per_user_per_sec = 0.0 for user_results in results.values(): last_task_end_time = start_time for result in user_results: > if result.date_done > last_task_end_time: E TypeError: can't compare offset-naive and offset-aware datetimes test/integration/test_celery_user_rate_limit.py:110: TypeError ``` Also https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow is deprecated since Python 3.12 .
- Loading branch information