Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: type iso_format(...) #79209

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/testutils/helpers/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__all__ = ["iso_format", "before_now", "timestamp_format"]


def iso_format(date):
def iso_format(date: datetime) -> str:
return date.isoformat()[:19]


Expand Down
3 changes: 2 additions & 1 deletion tests/snuba/api/serializers/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ def test_seen_stats(self):
# result is rounded down to nearest second
assert iso_format(result["lastSeen"]) == iso_format(self.min_ago)
assert iso_format(result["firstSeen"]) == iso_format(group_env.first_seen)
assert iso_format(group_env2.first_seen) > iso_format(group_env.first_seen)
assert group_env2.first_seen is not None
assert group_env2.first_seen > group_env.first_seen
assert result["userCount"] == 3

result = serialize(
Expand Down
Loading