Merge ~cjwatson/launchpadlib:fakelaunchpad-better-resource-creation into launchpadlib:main
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | a16d50865b379eb15a0f0a9e1ba2a327dc3eaab3 |
Proposed branch: | ~cjwatson/launchpadlib:fakelaunchpad-better-resource-creation |
Merge into: | launchpadlib:main |
Diff against target: |
303 lines (+136/-38) 4 files modified
NEWS.rst (+2/-0) src/launchpadlib/testing/launchpad.py (+59/-28) src/launchpadlib/testing/testing-wadl.xml (+8/-0) src/launchpadlib/testing/tests/test_launchpad.py (+67/-10) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jürgen Gmach | Approve | ||
Review via email: mp+435261@code.launchpad.net |
Commit message
Allow sample data with links to other entries/collections
Description of the change
`FakeLaunchpad` allowed setting sample data with plain attributes of entries, but it wasn't quite smart enough to support sample entries that link to other entries or collections, which is often necessary when testing `launchpadlib` clients in practice. It can handle this now.
I had to do a bit of flailing around with `wadllib` to figure out how all this works, but I've been able to use this for real testing of an `lpcraft` branch with some moderately complex structure in its sample data, so I'm reasonably sure I've got it right.
To post a comment you must log in.