Skip to content

Commit

Permalink
fix timezone in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Jan 15, 2024
1 parent 30c860f commit f4ec09b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
18 changes: 17 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sphinx = "^5.3.0"
sphinx-autobuild = "^2021.3.14"
timeout-decorator = "^0.5.0"
types-setuptools = "^65.6.0.2"
setuptools = "^69.0.3"

[tool.poetry.group.uvloop.dependencies]
uvloop = "^0.17.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import time
import uuid
from datetime import datetime
from datetime import datetime, timezone
from typing import Callable, Optional
from unittest import mock

Expand Down Expand Up @@ -369,7 +369,7 @@ async def test_incoming_message_info(
message_id=shortuuid.uuid(),
priority=0,
reply_to="test",
timestamp=datetime.utcfromtimestamp(int(time.time())),
timestamp=datetime.fromtimestamp(int(time.time()), tz=timezone.utc),
type="0",
user_id="guest",
)
Expand Down

0 comments on commit f4ec09b

Please sign in to comment.