Merge lp://qastaging/~jtv/launchpad/bug-629442 into lp://qastaging/launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 11499
Proposed branch: lp://qastaging/~jtv/launchpad/bug-629442
Merge into: lp://qastaging/launchpad
Diff against target: 70 lines (+18/-6)
2 files modified
lib/lp/testing/fakelibrarian.py (+7/-3)
lib/lp/testing/tests/test_fakelibrarian.py (+11/-3)
To merge this branch: bzr merge lp://qastaging/~jtv/launchpad/bug-629442
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+34539@code.qastaging.launchpad.net

Commit message

FakeLibrarian.create returns LibraryFileAlias.

Description of the change

= Bug 629442 =

Fixes the bug where FakeLibrarian.create returns a LibraryFileAlias id instead of a LibraryFileAlias.

Unlike the real librarian (and I mean, why!?) this does not involve creating a LibraryFileAlias, returning an id, then querying the database for the LibraryFileAlias with that id. I just made addFile and create both use the same private method that returns the LibraryFileAlias. (This seemed a bit cleaner than having the call relationship inverted compared to the real librarian and risking problems with future changes).

To test,
{{{
./bin/test -vvc lp.testing.tests.test_fakelibrarian
}}}

No lint.

Jeroen

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Looks quite nice Jeroen.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.