Page MenuHomeSoftware Heritage

Extract the dictify() function from BaseModel.to_dict()
ClosedPublic

Authored by douardda on Wed, Mar 11, 5:53 PM.

Details

Summary

this function does not need to be a local function of the to_dict namespace.

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

douardda created this revision.Wed, Mar 11, 5:53 PM

What about adding tests on this or do you rely on BaseModel's?

ardumont requested changes to this revision.Wed, Mar 11, 7:56 PM
This revision now requires changes to proceed.Wed, Mar 11, 7:56 PM
douardda added a comment.EditedThu, Mar 12, 1:49 PM

What about adding tests on this or do you rely on BaseModel's?

I do rely on nothing, just extracting a function ;-)

Now, I guess swh.model.model tests should be enough to cover this simple helper function. I do not see real value in adding tests here, other than for the sake of unit-ness of said tests.

douardda requested review of this revision.Thu, Mar 12, 2:31 PM
ardumont accepted this revision.Thu, Mar 12, 2:31 PM
This revision is now accepted and ready to land.Thu, Mar 12, 2:31 PM