Page MenuHomeSoftware Heritage

browse: Restrict view timestamp parameters to ISO 8601 dates
ClosedPublic

Authored by anlambert on Aug 4 2020, 4:46 PM.

Details

Summary

For consistency with other swh components, only accept datetime string
view parameters in ISO 8601 format.

This change drops the dateutil requirement in favor of the iso8601 one.

Closes T2375

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/web/tests/common/test_utils.py
49–50

pytest.mark.parametrize is nice for those kind of tests ;)

This revision is now accepted and ready to land.Aug 4 2020, 4:53 PM

Build is green

Patch application report for D3696 (id=13025)

Rebasing onto 957fd2fdfe...

Current branch diff-target is up to date.
Changes applied before test
commit 6d192093d9fd70521f817d7e35822e05fe6edc16
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Aug 4 14:44:16 2020 +0200

    browse: Restrict view timestamp parameters to ISO 8601 dates
    
    For consistency with other swh components, only accept datetime string
    view parameters in ISO 8601 format.
    
    This change drops the dateutil requirement in favor of the iso8601 one.
    
    Closes T2375

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

Update: Use pytest.mark.parametrize in updated tests

Build is green

Patch application report for D3696 (id=13026)

Rebasing onto 957fd2fdfe...

Current branch diff-target is up to date.
Changes applied before test
commit 55f380a80006f4008d450c2195d68adcf38ca9ae
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Aug 4 14:44:16 2020 +0200

    browse: Restrict view timestamp parameters to ISO 8601 dates
    
    For consistency with other swh components, only accept datetime string
    view parameters in ISO 8601 format.
    
    This change drops the dateutil requirement in favor of the iso8601 one.
    
    Closes T2375

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