Page MenuHomeSoftware Heritage

test_client: Migrate single deposit scenario to use requests_mock_datadir
ClosedPublic

Authored by ardumont on Thu, Oct 8, 7:09 PM.

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Thu, Oct 8, 7:09 PM

Build is green

Patch application report for D4205 (id=14836)

Could not rebase; Attempt merge onto cd9c04afe6...

Updating cd9c04af..ff845763
Fast-forward
 conftest.py                                        |   6 +-
 pytest.ini                                         |   2 +-
 swh/deposit/cli/client.py                          | 109 +++++++++++----------
 swh/deposit/tests/cli/test_client.py               |  51 ++++++----
 swh/deposit/tests/conftest.py                      |  14 +++
 .../data/https_deposit.swh.test/1_servicedocument  |  26 +++++
 .../tests/data/https_deposit.swh.test/1_test       |  19 ++++
 swh/deposit/tests/loader/conftest.py               |  14 ---
 8 files changed, 155 insertions(+), 86 deletions(-)
 create mode 100644 swh/deposit/tests/data/https_deposit.swh.test/1_servicedocument
 create mode 100644 swh/deposit/tests/data/https_deposit.swh.test/1_test
Changes applied before test
commit ff8457630b548728349aae18f5cbc223c942ef02
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:08:34 2020 +0200

    test_client: Migrate single deposit scenario to use requests_mock_datadir

commit 2b4ad2cfe1927507b0e182ec3f15a3a733ad5ae2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 18:41:51 2020 +0200

    test_client: Migrate collection ok test scenario to use requests_mock_datadir
    
    instead of mock

commit 7dc727087b99159335e3daf90b5a1c4180ebf5e6
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 15:56:09 2020 +0200

    cli.client: Add types

commit 98dcf27419726acb0e3cefaf1859346abffa4546
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 15:08:29 2020 +0200

    conftest: Declare swh.core pytest_plugin

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/182/ for more details.

ardumont added inline comments.Fri, Oct 9, 11:20 AM
swh/deposit/tests/cli/test_client.py
194

I'm gonna simplify this in a future refactoring diff.
(we can ask for the --format json as output)

vlorentz accepted this revision.Fri, Oct 9, 11:37 AM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/deposit/tests/cli/test_client.py
117

good

This revision is now accepted and ready to land.Fri, Oct 9, 11:37 AM

Build is green

Patch application report for D4205 (id=14867)

Rebasing onto b9e98c0c96...

Current branch diff-target is up to date.
Changes applied before test
commit af8381f853f5144ee44a49bfcfb5efb5ef8646fa
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:08:34 2020 +0200

    test_client: Migrate single deposit scenario to use requests_mock_datadir

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/190/ for more details.