Page MenuHomeSoftware Heritage

tests: Use TimestampWithTimezone.from_datetime() instead of the constructor
ClosedPublic

Authored by vlorentz on Jan 11 2022, 3:25 PM.

Details

Reviewers
ardumont
Group Reviewers
Reviewers
Maniphest Tasks
T3752: Store/represent time offsets as strings
Summary

A future release of swh-model will change its constructor's signature (replace 'offset'
and 'negative_utc_offset' with 'offset_bytes).

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25933
Build 40529: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 40528: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6915 (id=25058)

Rebasing onto e0a181daf4...

Current branch diff-target is up to date.
Changes applied before test
commit 54624013f63f0d7b96e4d18d8d35dfb433ce99e4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 11 15:25:25 2022 +0100

    tests: Use TimestampWithTimezone.from_datetime() instead of the constructor
    
    A future release of swh-model will change its constructor's signature (replace 'offset'
    and 'negative_utc_offset' with 'offset_bytes).

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1285/ for more details.

ardumont added a subscriber: ardumont.

lgtm

one suggestion inline.

swh/web/tests/common/test_converters.py
220

might as well inline this, date seems only used once.

This revision is now accepted and ready to land.Jan 12 2022, 11:39 AM

Build is green

Patch application report for D6915 (id=25088)

Rebasing onto 15e6e1988a...

Current branch diff-target is up to date.
Changes applied before test
commit 53287783315b4775a7d38d3d00b85d6d3eb41ceb
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 11 15:25:25 2022 +0100

    tests: Use TimestampWithTimezone.from_datetime() instead of the constructor
    
    A future release of swh-model will change its constructor's signature (replace 'offset'
    and 'negative_utc_offset' with 'offset_bytes).

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1293/ for more details.

9cfc70630b414b69f8e05cbe57922f3c57a8fb18