Merge lp:~mwhudson/launchpad/remove-commit-from-make_running_import into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 11136
Proposed branch: lp:~mwhudson/launchpad/remove-commit-from-make_running_import
Merge into: lp:launchpad
Diff against target: 19 lines (+0/-2)
1 file modified
lib/canonical/launchpad/testing/codeimporthelpers.py (+0/-2)
To merge this branch: bzr merge lp:~mwhudson/launchpad/remove-commit-from-make_running_import
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+30018@code.launchpad.net

Commit message

Remove an unnecessary database commit from the make_running_import test helper

Description of the change

Hi, this branch just deletes a now-unnecessary commit in a test helper. It should make the test suite a few seconds faster :-)

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/testing/codeimporthelpers.py'
2--- lib/canonical/launchpad/testing/codeimporthelpers.py 2010-02-18 02:31:34 +0000
3+++ lib/canonical/launchpad/testing/codeimporthelpers.py 2010-07-15 15:21:04 +0000
4@@ -14,7 +14,6 @@
5 from datetime import datetime, timedelta
6
7 from pytz import UTC
8-import transaction
9 from zope.component import getUtility
10 from zope.security.proxy import removeSecurityProxy
11
12@@ -56,7 +55,6 @@
13 code_import = factory.makeCodeImport()
14 if machine is None:
15 machine = factory.makeCodeImportMachine(set_online=True)
16- transaction.commit() # Commit so factory created persons are valid
17 # The code import must be in a reviewed state.
18 if code_import.review_status != CodeImportReviewStatus.REVIEWED:
19 code_import.updateFromData(