Page MenuHomeSoftware Heritage

D6909.diff
No OneTemporary

D6909.diff

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

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

Event Timeline