Merge ppa-dev-tools:set-command-basic-unittests into ppa-dev-tools:main
Status: | Merged |
---|---|
Merged at revision: | 62203735c8f705687711c2a18a54d3b4bd5d9131 |
Proposed branch: | ppa-dev-tools:set-command-basic-unittests |
Merge into: | ppa-dev-tools:main |
Diff against target: |
222 lines (+100/-15) 4 files modified
ppa/ppa.py (+11/-0) scripts/ppa (+20/-2) tests/helpers.py (+5/-2) tests/test_scripts_ppa.py (+64/-11) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Athos Ribeiro (community) | Approve | ||
Canonical Server | Pending | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+439454@code.staging.launchpad.net |
Description of the change
Adds support for enabling and disabling publishing. Not entirely sure why one would want to change this setting, but it's a simple boolean so is easy to implement.
But the actual main thrust of this branch is to improve the testing for the create and set commands, the --publish option just serves as a useful case for testing. The unit tests go beyond just checking the argument handling itself, to verify the changes get passed down to the (mock) launchpad PPA object.
In doing this I discovered that my earlier fixup for the ArchiveMock class was incorrect; it happened to work then just because we weren't really using it for anything notable. With the expanded tests for the set command, the error became apparent. This branch corrects that by monkeypatching the PersonMock class to setup the ArchiveMock during creation (as suggested by one of the reviewers of the previous code IIRC).
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
Nice work, Bryce! LGTM