Merge lp://staging/~gary/launchpad/bug548-db-2-tests into lp://staging/launchpad/db-devel

Proposed by Gary Poster
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 10177
Proposed branch: lp://staging/~gary/launchpad/bug548-db-2-tests
Merge into: lp://staging/launchpad/db-devel
Prerequisite: lp://staging/~gary/launchpad/bug548-db-2
Diff against target: 488 lines (+136/-133)
6 files modified
lib/canonical/widgets/__init__.py (+0/-12)
lib/lp/archivepublisher/tests/publishing-meta-data-files.txt (+3/-1)
lib/lp/archivepublisher/tests/test_dominator.py (+3/-1)
lib/lp/archivepublisher/tests/test_publisher.py (+7/-4)
lib/lp/bugs/doc/bugnotification-sending.txt (+83/-115)
lib/lp/testing/dbuser.py (+40/-0)
To merge this branch: bzr merge lp://staging/~gary/launchpad/bug548-db-2-tests
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+48570@code.staging.launchpad.net

Commit message

[r=lifeless][no-qa] Add context manager to temporarily change the db user in order to make some tests pass

Description of the change

This branch fixes tests that failed on ~gary/launchpad/bug548-db-2

I added a test tool because I was doing the same thing over and over again, and other tests I was touch were too.

I'm not entirely satisfied with the test helper--tests for it would be nice, for instance, and I wonder if it should hang off the Layer, and so on--but this is an improvement at least.

I would love to get this landed before pqm early my tomorrow morning, and would be happy to promise to make a branch to fix review comments afterwards (that is, first thing tomorrow morning) if that is acceptable.

Thank you

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

I would be happiest if you shrunk your helper to be purely push/pop - that seems nicer and cleaner (and without tests that matters more to me :)).

review: Approve
Revision history for this message
Gary Poster (gary) wrote :

Thanks Robert. I removed restore_name entirely, per your suggestion. Push/pop was in fact my only intent.

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.

Subscribers

People subscribed via source and target branches

to status/vote changes: