Page MenuHomeSoftware Heritage

tests/identifiers: fix 'target', 'directory' and 'parents' object types
ClosedPublic

Authored by douardda on Mar 11 2020, 5:55 PM.

Details

Summary

These are expected to be bytes, not str.

Depends on D2817.

Diff Detail

Repository
rDMOD Data model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Mar 11 2020, 7:57 PM
olasd requested changes to this revision.Mar 11 2020, 8:06 PM
olasd added a subscriber: olasd.

Thanks for this change.

I'm not sure why the type of ids isn't changed as well?

Stylistically, I'm really not sure about the inconsistent replacement of hash_to_bytes calls, with a shorthand that we've never used anywhere else. And the bhex name doesn't look very meaningful (frankly, if we're going there, I'd rather have it called b()).

This revision now requires changes to proceed.Mar 11 2020, 8:06 PM

replace bhex() by _x() and other stuff reported by olasd

I still think the id bytes / hex string inconsistency for releases, revisions, directories and contents should be fixed, but I think this short-hand notation looks decent.

This revision is now accepted and ready to land.Mar 12 2020, 2:33 PM