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.
Showing
- requirements-server.txt 1 addition, 1 deletionrequirements-server.txt
- swh/deposit/api/common.py 1 addition, 1 deletionswh/deposit/api/common.py
- swh/deposit/tests/api/test_deposit.py 3 additions, 3 deletionsswh/deposit/tests/api/test_deposit.py
- swh/deposit/tests/api/test_deposit_atom.py 7 additions, 8 deletionsswh/deposit/tests/api/test_deposit_atom.py
- swh/deposit/tests/api/test_deposit_binary.py 1 addition, 1 deletionswh/deposit/tests/api/test_deposit_binary.py
- swh/deposit/tests/api/test_deposit_multipart.py 23 additions, 21 deletionsswh/deposit/tests/api/test_deposit_multipart.py
- swh/deposit/tests/api/test_deposit_private_read_metadata.py 3 additions, 3 deletionsswh/deposit/tests/api/test_deposit_private_read_metadata.py
- swh/deposit/tests/api/test_deposit_update.py 4 additions, 4 deletionsswh/deposit/tests/api/test_deposit_update.py
- swh/deposit/tests/conftest.py 2 additions, 2 deletionsswh/deposit/tests/conftest.py
- tox.ini 3 additions, 1 deletiontox.ini
Loading
Please register or sign in to comment