Page MenuHomeSoftware Heritage

test_cassandra: Use data model object
ClosedPublic

Authored by ardumont on Jul 17 2020, 4:38 PM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3554 (id=12529)

Rebasing onto eb2bf8ce68...

Current branch diff-target is up to date.
Changes applied before test
commit 2b239f02f69c54d067c16054a15976268acbdd12
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 17 16:37:31 2020 +0200

    test_cassandra: Use data model object
    
    Related to T2494

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

douardda added a subscriber: douardda.

not sure I like too much the

cont, cont2 = [
          attr.evolve(c, ctime=now()) for c in sample_data_model["content"][:2]
      ]

stuff but oh well.

(I mean I find this easier to read:

cont = attr.evolve(sample_data_model["content"][0], ctime=now())
cont2 = attr.evolve(sample_data_model["content"][1], ctime=now())

)

This revision is now accepted and ready to land.Jul 17 2020, 5:04 PM

That's most probably because i like destructuring a lot (from other languages ;)

If you don't push much more than that though, i'll keep as it is (i'm lazy today ;)

This revision was automatically updated to reflect the committed changes.