← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~thumper/launchpad/move-mocklogger into lp:launchpad/devel

 

Tim Penhey has proposed merging lp:~thumper/launchpad/move-mocklogger into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


A simple change to move code out of canonical.launchpad.ftests.
-- 
https://code.launchpad.net/~thumper/launchpad/move-mocklogger/+merge/29698
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thumper/launchpad/move-mocklogger into lp:launchpad/devel.
=== modified file 'lib/lp/code/model/tests/test_revision.py'
--- lib/lp/code/model/tests/test_revision.py	2010-04-16 15:06:55 +0000
+++ lib/lp/code/model/tests/test_revision.py	2010-07-12 13:19:43 +0000
@@ -18,7 +18,6 @@
 
 from canonical.database.sqlbase import cursor
 from canonical.launchpad.ftests import login, logout
-from canonical.launchpad.ftests.logger import MockLogger
 from canonical.launchpad.interfaces.lpstorm import IMasterObject
 from canonical.launchpad.interfaces.account import AccountStatus
 from canonical.launchpad.scripts.garbo import RevisionAuthorEmailLinker
@@ -33,6 +32,7 @@
 from lp.registry.model.karma import Karma
 from lp.testing import TestCaseWithFactory, time_counter
 from lp.testing.factory import LaunchpadObjectFactory
+from lp.testing.logger import MockLogger
 
 
 class TestRevisionCreationDate(TestCaseWithFactory):

=== modified file 'lib/lp/code/model/tests/test_revisionauthor.py'
--- lib/lp/code/model/tests/test_revisionauthor.py	2010-01-07 06:40:23 +0000
+++ lib/lp/code/model/tests/test_revisionauthor.py	2010-07-12 13:19:43 +0000
@@ -12,10 +12,10 @@
 
 from canonical.config import config
 from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
-from canonical.launchpad.ftests.logger import MockLogger
 from canonical.launchpad.scripts.garbo import RevisionAuthorEmailLinker
 from lp.testing import TestCase
 from lp.testing.factory import LaunchpadObjectFactory
+from lp.testing.logger import MockLogger
 from canonical.testing import LaunchpadZopelessLayer
 from lp.code.model.revision import RevisionAuthor, RevisionSet
 from lp.registry.interfaces.person import IPersonSet

=== modified file 'lib/lp/code/scripts/tests/test_revisionkarma.py'
--- lib/lp/code/scripts/tests/test_revisionkarma.py	2009-08-04 00:41:49 +0000
+++ lib/lp/code/scripts/tests/test_revisionkarma.py	2010-07-12 13:19:43 +0000
@@ -11,14 +11,14 @@
 
 from canonical.config import config
 from canonical.launchpad.database.emailaddress import EmailAddressSet
-from canonical.launchpad.ftests.logger import MockLogger
 from canonical.launchpad.scripts.garbo import RevisionAuthorEmailLinker
-from lp.testing import TestCaseWithFactory
 from canonical.testing import LaunchpadZopelessLayer
 
 from lp.code.model.revision import RevisionSet
 from lp.code.scripts.revisionkarma import RevisionKarmaAllocator
 from lp.registry.model.karma import Karma
+from lp.testing import TestCaseWithFactory
+from lp.testing.logger import MockLogger
 
 
 class TestRevisionKarma(TestCaseWithFactory):

=== modified file 'lib/lp/hardwaredb/doc/hwdb.txt'
--- lib/lp/hardwaredb/doc/hwdb.txt	2010-02-02 17:12:29 +0000
+++ lib/lp/hardwaredb/doc/hwdb.txt	2010-07-12 13:19:43 +0000
@@ -376,7 +376,7 @@
     >>> user.validateAndEnsurePreferredEmail(email)
     >>> transaction.commit()
     >>> from canonical.launchpad.scripts.garbo import HWSubmissionEmailLinker
-    >>> from canonical.launchpad.ftests.logger import MockLogger
+    >>> from lp.testing.logger import MockLogger
     >>> HWSubmissionEmailLinker(log=MockLogger()).run()
     >>> submission = hw_submission_set.getBySubmissionKey(u'unique-id-2')
     >>> print submission.owner.displayname

=== modified file 'lib/lp/registry/doc/standing.txt'
--- lib/lp/registry/doc/standing.txt	2010-04-01 03:30:30 +0000
+++ lib/lp/registry/doc/standing.txt	2010-07-12 13:19:43 +0000
@@ -56,7 +56,7 @@
     ...     UpdatePersonalStanding)
     >>> from canonical.config import config
     >>> from canonical.testing import LaunchpadZopelessLayer
-    >>> from canonical.launchpad.ftests.logger import MockLogger
+    >>> from lp.testing.logger import MockLogger
     >>> class TestableScript(UpdatePersonalStanding):
     ...     """A testable version of `UpdatePersonalStanding`."""
     ...     def main(self):

=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2010-05-21 12:39:44 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2010-07-12 13:19:43 +0000
@@ -113,7 +113,7 @@
 
   >>> import logging
   >>> from canonical.config import config
-  >>> from canonical.launchpad.ftests.logger import MockLogger
+  >>> from lp.testing.logger import MockLogger
   >>> from lp.soyuz.scripts.soyuz_process_upload import (
   ...     ProcessUpload)
   >>> from canonical.testing import LaunchpadZopelessLayer

=== renamed file 'lib/canonical/launchpad/ftests/logger.py' => 'lib/lp/testing/logger.py'
--- lib/canonical/launchpad/ftests/logger.py	2009-08-31 08:09:48 +0000
+++ lib/lp/testing/logger.py	2010-07-12 13:19:43 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009, 2010 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Frequently-used logging utilities for test suite."""
@@ -63,4 +63,3 @@
 
     def exception(self, *args):
         self.log(*args, **{'exc_info': True})
-

=== renamed file 'lib/canonical/launchpad/ftests/test_mocklogger.py' => 'lib/lp/testing/tests/test_mocklogger.py'
--- lib/canonical/launchpad/ftests/test_mocklogger.py	2009-08-31 08:39:09 +0000
+++ lib/lp/testing/tests/test_mocklogger.py	2010-07-12 13:19:43 +0000
@@ -9,7 +9,7 @@
 import unittest
 from cStringIO import StringIO
 
-from canonical.launchpad.ftests.logger import MockLogger
+from lp.testing.logger import MockLogger
 
 
 class TestMockLogger(unittest.TestCase):

=== modified file 'lib/lp/translations/doc/poexport-request-productseries.txt'
--- lib/lp/translations/doc/poexport-request-productseries.txt	2010-04-26 16:00:31 +0000
+++ lib/lp/translations/doc/poexport-request-productseries.txt	2010-07-12 13:19:43 +0000
@@ -7,7 +7,7 @@
 
 This is a dummy logger class to capture the export's log messages.
 
-    >>> from canonical.launchpad.ftests.logger import MockLogger
+    >>> from lp.testing.logger import MockLogger
     >>> from lp.registry.model.person import Person
     >>> person = Person.selectOneBy(name='name12')
 

=== modified file 'lib/lp/translations/doc/poimport.txt'
--- lib/lp/translations/doc/poimport.txt	2010-02-19 16:54:42 +0000
+++ lib/lp/translations/doc/poimport.txt	2010-07-12 13:19:43 +0000
@@ -681,7 +681,7 @@
 two hand-approved Welsh translations that have just been imported.
 
     >>> import logging
-    >>> from canonical.launchpad.ftests.logger import MockLogger
+    >>> from lp.testing.logger import MockLogger
     >>> process = ImportQueueGardener('approver', test_args=[])
     >>> process.logger = MockLogger()
     >>> process.logger.setLevel(logging.INFO)


Follow ups