Page MenuHomeSoftware Heritage

Add tox.ini and pytest.ini in the MANIFEST.in file
ClosedPublic

Authored by douardda on Fri, Jan 10, 5:16 PM.

Details

Summary

Make tests pass with django 2

For this we:

  • ensure we create the DepositRequest with str as raw_metadata (instead of a bytes), and
  • make atom_dataset return a str instead of a bytes

    Every time this chunk of data is sent on the wire (http req to the django app) this needs to be an str, otherwise we have things like:

    raw_metadata = "b'[...]'"

    especially when testing against django 2, which is the only django version available on debian sid, so this is needed to make it possible to build the deb file on sid *with* tests enabled.
  • add a py3-django2 environment in tox
  • bump the dependency to django <3 in requirements-server.txt (otherwise it will take precendence on the deps: field of the tox file, thus execute tests in py3-django2 with django 1.11).

Note that no other tests than executing pytest have been done with django2, so
do not expect it works flawlessly.

Test Plan

tox should still be happy...

Diff Detail

Repository
rDDEP swh-deposit
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.Fri, Jan 10, 5:16 PM
ardumont accepted this revision.Mon, Jan 13, 10:43 AM
ardumont added a subscriber: ardumont.

ok then ;)

This revision is now accepted and ready to land.Mon, Jan 13, 10:43 AM