Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9345034
D6909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6909.diff
View Options
diff --git a/swh/indexer/tests/utils.py b/swh/indexer/tests/utils.py
--- a/swh/indexer/tests/utils.py
+++ b/swh/indexer/tests/utils.py
@@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import abc
+import datetime
import functools
from typing import Any, Dict
import unittest
@@ -27,7 +28,6 @@
Snapshot,
SnapshotBranch,
TargetType,
- Timestamp,
TimestampWithTimezone,
)
from swh.storage.utils import now
@@ -110,17 +110,29 @@
fullname=b"Andrew Nesbitt <andrewnez@gmail.com>",
email=b"andrewnez@gmail.com",
),
- committer_date=TimestampWithTimezone(
- timestamp=Timestamp(seconds=1380883849, microseconds=0,),
- offset=120,
- negative_utc=False,
+ committer_date=TimestampWithTimezone.from_datetime(
+ datetime.datetime(
+ 2013,
+ 10,
+ 4,
+ 12,
+ 50,
+ 49,
+ tzinfo=datetime.timezone(datetime.timedelta(minutes=120)),
+ )
),
type=RevisionType.GIT,
synthetic=False,
- date=TimestampWithTimezone(
- timestamp=Timestamp(seconds=1487596456, microseconds=0,),
- offset=0,
- negative_utc=False,
+ date=TimestampWithTimezone.from_datetime(
+ datetime.datetime(
+ 2017,
+ 2,
+ 20,
+ 16,
+ 14,
+ 16,
+ tzinfo=datetime.timezone(datetime.timedelta(minutes=120)),
+ )
),
directory=DIRECTORY2.id,
parents=(),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 3:01 PM (5 d, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219318
Attached To
D6909: tests: Use TimestampWithTimezone.from_datetime() instead of the constructor
Event Timeline
Log In to Comment