← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/codeimport-test-isolation into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/codeimport-test-isolation into lp:launchpad.

Commit message:
Isolate TestWorkerMonitorIntegration from the running user's bzr configuration.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/codeimport-test-isolation/+merge/270245

Isolate TestWorkerMonitorIntegration from the running user's bzr configuration.  If, like me, you happen to have "create_signatures = always" and a gpg_signing_key set in ~/.bazaar/bazaar.conf, this stops the test suite from trying and failing to sign things with that key.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/codeimport-test-isolation into lp:launchpad.
=== modified file 'lib/lp/codehosting/codeimport/tests/test_workermonitor.py'
--- lib/lp/codehosting/codeimport/tests/test_workermonitor.py	2012-11-25 23:20:22 +0000
+++ lib/lp/codehosting/codeimport/tests/test_workermonitor.py	2015-09-05 15:50:13 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2015 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for the CodeImportWorkerMonitor and related classes."""
@@ -15,7 +15,10 @@
 import urllib
 
 from bzrlib.branch import Branch
-from bzrlib.tests import TestCase as BzrTestCase
+from bzrlib.tests import (
+    TestCase as BzrTestCase,
+    TestCaseInTempDir,
+    )
 import oops_twisted
 from testtools.deferredruntest import (
     assert_fails_with,
@@ -666,13 +669,13 @@
         return protocol
 
 
-class TestWorkerMonitorIntegration(BzrTestCase):
+class TestWorkerMonitorIntegration(TestCaseInTempDir):
 
     layer = ZopelessAppServerLayer
     run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=60)
 
     def setUp(self):
-        BzrTestCase.setUp(self)
+        super(TestWorkerMonitorIntegration, self).setUp()
         login('no-priv@xxxxxxxxxxxxx')
         self.factory = LaunchpadObjectFactory()
         nuke_codeimport_sample_data()
@@ -682,7 +685,7 @@
         self.foreign_commit_count = 0
 
     def tearDown(self):
-        BzrTestCase.tearDown(self)
+        super(TestWorkerMonitorIntegration, self).tearDown()
         logout()
 
     def makeCVSCodeImport(self):


Follow ups