Page MenuHomeSoftware Heritage

Add assertOriginMetadataOk.

Authored by vlorentz on Nov 27 2018, 6:47 PM.


Group Reviewers
Test Plan

Has no proper test yet (T1393). I'm going to send a diff that uses it for swh.deposit.

Diff Detail

rDLDBASE Generic VCS Loader
No Linters Available
No Unit Test Coverage
Build Status
Buildable 2819
Build 3546: tox-on-jenkinsJenkins
Build 3545: arc lint + arc unit

Event Timeline

vlorentz created this revision.Nov 27 2018, 6:47 PM
vlorentz updated this revision to Diff 2353.Nov 30 2018, 12:13 PM
  • feature branch
vlorentz updated this revision to Diff 2362.Nov 30 2018, 1:24 PM
  • Make flake8 happy.
zack added a subscriber: zack.Dec 1 2018, 3:48 PM
zack added inline comments.

I realize this it not a problem introduced by this diffs, but FWIW the naming of all these assertion should be assertFooEqual, not assertFooOk, because that is what they're testing.

If would be just awesome if you could take the chance of this change to refactor that :-)

Your example, though, makes this distinction particularly relevant. Because for metadata (which are dictionaries) it would make sense to both asserts equality and to assert that the expected metadata are a subset of the obtained one, as in the future we might end up detecting more metadata, and making old tests failing only due to that might not be what we want, at least in some cases.

vlorentz updated this revision to Diff 2419.Dec 4 2018, 4:24 PM
  • Rename method.
anlambert accepted this revision.Dec 4 2018, 4:26 PM
This revision is now accepted and ready to land.Dec 4 2018, 4:26 PM
vlorentz marked an inline comment as done.Dec 5 2018, 10:03 AM
vlorentz added inline comments.

Done in D772