Page MenuHomeSoftware Heritage

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

Authored by douardda on Mar 11 2020, 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

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

This revision now requires changes to proceed.Mar 11 2020, 7:56 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.

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