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
=== modified file 'lib/canonical/launchpad/testing/codeimporthelpers.py'
--- lib/canonical/launchpad/testing/codeimporthelpers.py 2010-02-18 02:31:34 +0000
+++ lib/canonical/launchpad/testing/codeimporthelpers.py 2010-07-15 15:21:04 +0000
@@ -14,7 +14,6 @@
14from datetime import datetime, timedelta14from datetime import datetime, timedelta
1515
16from pytz import UTC16from pytz import UTC
17import transaction
18from zope.component import getUtility17from zope.component import getUtility
19from zope.security.proxy import removeSecurityProxy18from zope.security.proxy import removeSecurityProxy
2019
@@ -56,7 +55,6 @@
56 code_import = factory.makeCodeImport()55 code_import = factory.makeCodeImport()
57 if machine is None:56 if machine is None:
58 machine = factory.makeCodeImportMachine(set_online=True)57 machine = factory.makeCodeImportMachine(set_online=True)
59 transaction.commit() # Commit so factory created persons are valid
60 # The code import must be in a reviewed state.58 # The code import must be in a reviewed state.
61 if code_import.review_status != CodeImportReviewStatus.REVIEWED:59 if code_import.review_status != CodeImportReviewStatus.REVIEWED:
62 code_import.updateFromData(60 code_import.updateFromData(