launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04580
[Merge] lp:~stevenk/launchpad/kill-test-suite-dead into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/kill-test-suite-dead into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/kill-test-suite-dead/+merge/71353
Forgive me, for I have sinned ...
There are a large amount of test_suite function definitions in our test suite that are no longer needed. I have been ripping them out when I've noticed, or had an inclination too.
This branch goes a little further than that.
Using the below script, I ran it over our tree.
#!/usr/bin/perl -w
use strict;
undef $/; # We want our files as one long string. Tasty.
open F, "<$ARGV[0]" or die "$!";
$_ = <F>;
close F;
die "File does not mention test_suite" unless /def test_suite()/;
die "File mentions doctests" if /doctest/i;
s/\s+def test_suite.*$/\n/sm;
open F, ">$ARGV[0]" or die "$!";
print F;
close F;
I then went through and reverted everything that looked like it required it, such as DocFile-related things and so on. I then ran pyflakes over all the changed files and made sure I cleaned up unused imports or undefined errors.
--
https://code.launchpad.net/~stevenk/launchpad/kill-test-suite-dead/+merge/71353
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/kill-test-suite-dead into lp:launchpad.
=== modified file 'lib/canonical/buildd/tests/test_buildd_slave.py'
--- lib/canonical/buildd/tests/test_buildd_slave.py 2010-09-28 11:05:14 +0000
+++ lib/canonical/buildd/tests/test_buildd_slave.py 2011-08-12 12:59:24 +0000
@@ -196,7 +196,3 @@
self.assertTrue(
info.startswith("%s not in [" % buildername),
'UNKNOWNBUILDER info is "%s"' % info)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/buildd/tests/test_generate_translation_templates.py'
--- lib/canonical/buildd/tests/test_generate_translation_templates.py 2010-12-24 11:42:15 +0000
+++ lib/canonical/buildd/tests/test_generate_translation_templates.py 2011-08-12 12:59:24 +0000
@@ -3,7 +3,6 @@
import os
from StringIO import StringIO
-from unittest import TestLoader
import tarfile
from lp.testing.fakemethod import FakeMethod
@@ -114,7 +113,3 @@
'lib/canonical/buildd/pottery/generate_translation_templates.py',
args=[tempdir, self.result_name, workdir])
self.assertEqual(0, retval)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py'
--- lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py 2010-12-30 15:02:20 +0000
+++ lib/canonical/buildd/tests/test_translationtemplatesbuildmanager.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
import os
-from unittest import TestLoader
-
from lp.testing import TestCase
from lp.testing.fakemethod import FakeMethod
@@ -173,7 +171,3 @@
TranslationTemplatesBuildState.REAP, self.getState())
self.assertEqual(expected_command, self.buildmanager.commands[-1])
self.assertTrue(self.slave.wasCalled('buildFail'))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/config/tests/test_config_lookup.py'
--- lib/canonical/config/tests/test_config_lookup.py 2011-02-18 17:50:51 +0000
+++ lib/canonical/config/tests/test_config_lookup.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import os
import shutil
from tempfile import mkdtemp, NamedTemporaryFile
-import unittest
from canonical import config
from lp.testing import TestCase
@@ -152,7 +151,3 @@
magic_line in overrides,
"Overrides doesn't contain the magic include line (%s):\n%s" %
(magic_line, overrides))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/database/ftests/test_isolation.py'
--- lib/canonical/database/ftests/test_isolation.py 2010-07-16 08:54:42 +0000
+++ lib/canonical/database/ftests/test_isolation.py 2011-08-12 12:59:24 +0000
@@ -134,8 +134,3 @@
self.failUnlessEqual(self.getCurrentIsolation(con), 'serializable')
con.rollback()
self.failUnlessEqual(self.getCurrentIsolation(con), 'serializable')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/canonical/database/tests/test_zopeless_transaction_manager.py'
--- lib/canonical/database/tests/test_zopeless_transaction_manager.py 2010-03-24 17:37:26 +0000
+++ lib/canonical/database/tests/test_zopeless_transaction_manager.py 2011-08-12 12:59:24 +0000
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import unittest
-
from zope.component import getUtility
from storm.zope.interfaces import IZStorm
@@ -25,7 +23,3 @@
new_active_stores = [
item[0] for item in getUtility(IZStorm).iterstores()]
self.assertContentEqual(active_stores, new_active_stores)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/browser/tests/test_branchtraversal.py'
--- lib/canonical/launchpad/browser/tests/test_branchtraversal.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/browser/tests/test_branchtraversal.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for branch traversal."""
-import unittest
-
from lazr.restful.testing.webservice import FakeRequest
from zope.component import getUtility
from zope.publisher.interfaces import NotFound
@@ -159,7 +157,3 @@
# NotFound is raised if the branch name doesn't exist.
branch_name = self.factory.getUniqueString()
self.assertRaises(NotFound, self.traverse, [branch_name])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/browser/tests/test_logintoken.py'
--- lib/canonical/launchpad/browser/tests/test_logintoken.py 2010-12-08 17:22:23 +0000
+++ lib/canonical/launchpad/browser/tests/test_logintoken.py 2011-08-12 12:59:24 +0000
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import unittest
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -65,7 +63,3 @@
self.assertEquals(actions['field.actions.cancel'].submitted(), True)
self.assertEquals(harness.view.errors, [])
self.assertEquals(harness.view.next_url, self.expected_next_url)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/daemons/tests/test_tachandler.py'
--- lib/canonical/launchpad/daemons/tests/test_tachandler.py 2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/daemons/tests/test_tachandler.py 2011-08-12 12:59:24 +0000
@@ -43,10 +43,3 @@
pass
self.assertRaises(TacException, CouldNotListenTac().setUp)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TacTestSetupTestCase))
- return suite
-
=== modified file 'lib/canonical/launchpad/database/tests/test_account.py'
--- lib/canonical/launchpad/database/tests/test_account.py 2011-05-02 15:51:31 +0000
+++ lib/canonical/launchpad/database/tests/test_account.py 2011-08-12 12:59:24 +0000
@@ -6,8 +6,6 @@
__metaclass__ = type
__all__ = []
-import unittest
-
from testtools.testcase import ExpectedException
import transaction
from zope.component import getUtility
@@ -200,7 +198,3 @@
EmailAddressStatus.OLD)
transaction.commit()
self.assertContentEqual(account.guessed_emails, [new_email])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/database/tests/test_oauth.py'
--- lib/canonical/launchpad/database/tests/test_oauth.py 2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/database/tests/test_oauth.py 2011-08-12 12:59:24 +0000
@@ -53,12 +53,3 @@
class OAuthNonceTestCase(BaseOAuthTestCase):
class_ = OAuthNonce
-
-
-def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(OAuthAccessTokenTestCase),
- unittest.makeSuite(OAuthRequestTokenTestCase),
- unittest.makeSuite(OAuthNonceTestCase),
- unittest.makeSuite(OAuthConsumerTestCase),
- ))
=== modified file 'lib/canonical/launchpad/database/tests/test_openidconsumer.py'
--- lib/canonical/launchpad/database/tests/test_openidconsumer.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/database/tests/test_openidconsumer.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from canonical.launchpad.database.tests.test_baseopenidstore import (
@@ -25,7 +23,3 @@
def setUp(self):
super(OpenIDConsumerStoreTests, self).setUp()
self.store = getUtility(IOpenIDConsumerStore)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/database/tests/test_stormsugar.py'
--- lib/canonical/launchpad/database/tests/test_stormsugar.py 2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/database/tests/test_stormsugar.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from psycopg2 import IntegrityError
from storm.locals import (
Int,
@@ -125,7 +123,3 @@
obj2 = ReferencingObjectWithName(foo=obj1)
self.assertEqual(obj1, obj2.foo)
self.assertEqual(obj1.id, obj2._foo_id)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/ftests/test_keyringtrustanalyser.py'
--- lib/canonical/launchpad/scripts/ftests/test_keyringtrustanalyser.py 2010-10-21 04:19:36 +0000
+++ lib/canonical/launchpad/scripts/ftests/test_keyringtrustanalyser.py 2011-08-12 12:59:24 +0000
@@ -290,7 +290,3 @@
self.assertNotEqual(person, None)
self.assertEqual(person.preferredemail, None)
self.assertTrue('newemail@xxxxxxxxxxxxx' in self._getEmails(person))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/ftests/test_oops_prune.py'
--- lib/canonical/launchpad/scripts/ftests/test_oops_prune.py 2011-08-10 06:50:52 +0000
+++ lib/canonical/launchpad/scripts/ftests/test_oops_prune.py 2011-08-12 12:59:24 +0000
@@ -304,8 +304,3 @@
self.failIf(
os.path.isdir(os.path.join(self.oops_dir, date))
)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/canonical/launchpad/scripts/tests/test_entitlementimport.py'
--- lib/canonical/launchpad/scripts/tests/test_entitlementimport.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/scripts/tests/test_entitlementimport.py 2011-08-12 12:59:24 +0000
@@ -182,6 +182,3 @@
self.handler.assertLogsMessage(
"[E0] You may not change the person for the entitlement.",
level=logging.INFO)
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/tests/test_hwdb_submission_parser.py'
--- lib/canonical/launchpad/scripts/tests/test_hwdb_submission_parser.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/scripts/tests/test_hwdb_submission_parser.py 2011-08-12 12:59:24 +0000
@@ -14,7 +14,6 @@
import logging
import os
from textwrap import dedent
-from unittest import TestLoader
import pytz
@@ -2576,7 +2575,3 @@
'Consistency check detects circular parent-child relationships',
"Found HAL devices with circular parent/child "
"relationship: ['/foo', '/bar']")
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py'
--- lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py 2011-05-27 21:12:25 +0000
+++ lib/canonical/launchpad/scripts/tests/test_hwdb_submission_processing.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
from datetime import datetime
import logging
import os
-from unittest import TestLoader
import pytz
from zope.component import getUtility
@@ -5486,7 +5485,3 @@
'Unexpected status of submission 1: %s' % submission_2.status)
SubmissionParser.processSubmission = process_submission_regular
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/tests/test_librarian_apache_log_parser.py'
--- lib/canonical/launchpad/scripts/tests/test_librarian_apache_log_parser.py 2010-12-23 01:02:00 +0000
+++ lib/canonical/launchpad/scripts/tests/test_librarian_apache_log_parser.py 2011-08-12 12:59:24 +0000
@@ -5,7 +5,6 @@
import os
from StringIO import StringIO
import subprocess
-import unittest
from zope.component import getUtility
@@ -162,7 +161,3 @@
self.assertEqual(libraryfile_set[1].hits, 1)
self.assertEqual(libraryfile_set[2].hits, 1)
self.assertEqual(libraryfile_set[3].hits, 1)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/scripts/tests/test_scriptmonitor.py'
--- lib/canonical/launchpad/scripts/tests/test_scriptmonitor.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/scripts/tests/test_scriptmonitor.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,7 @@
__metaclass__ = type
import logging
-import unittest
+from unittest import TestCase
from canonical import lp
from canonical.database.sqlbase import connect
@@ -15,7 +15,7 @@
from canonical.testing.layers import DatabaseLayer
-class CheckScriptTestCase(unittest.TestCase):
+class CheckScriptTestCase(TestCase):
"""Test script activity."""
layer = DatabaseLayer
@@ -58,7 +58,3 @@
'script-monitor-test',
'2007-05-23 00:30:00', '2007-05-23 01:30:00'),
output)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/testing/tests/test_googleservice.py'
--- lib/canonical/launchpad/testing/tests/test_googleservice.py 2011-03-07 16:32:12 +0000
+++ lib/canonical/launchpad/testing/tests/test_googleservice.py 2011-08-12 12:59:24 +0000
@@ -49,7 +49,3 @@
# We got a strange OSError, which we'll pass upwards.
raise
return True
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_account.py'
--- lib/canonical/launchpad/tests/test_account.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/tests/test_account.py 2011-08-12 12:59:24 +0000
@@ -1,8 +1,6 @@
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import unittest
-
from canonical.launchpad.ftests import (
ANONYMOUS,
login,
@@ -73,7 +71,3 @@
login(ANONYMOUS)
self.failIf(check_permission(
'launchpad.View', self.account.preferredemail))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_launchpadlib.py'
--- lib/canonical/launchpad/tests/test_launchpadlib.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/tests/test_launchpadlib.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from launchpadlib.testing.helpers import salgado_with_full_permissions
import transaction
@@ -55,7 +53,3 @@
# so project.milestones[0] doesn't work.
milestone = self.project.active_milestones[:1][0]
self.verifyAttributes(milestone)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_login.py'
--- lib/canonical/launchpad/tests/test_login.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/tests/test_login.py 2011-08-12 12:59:24 +0000
@@ -3,7 +3,6 @@
import cgi
from datetime import datetime
-import unittest
import lazr.uri
from zope.component import getUtility
@@ -202,7 +201,3 @@
self.request)
self.failUnless(ILaunchpadPrincipal.providedBy(principal))
self.failUnless(principal.person is None)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_poll.py'
--- lib/canonical/launchpad/tests/test_poll.py 2011-01-05 19:18:57 +0000
+++ lib/canonical/launchpad/tests/test_poll.py 2011-08-12 12:59:24 +0000
@@ -5,7 +5,6 @@
datetime,
timedelta,
)
-import unittest
import pytz
@@ -28,7 +27,3 @@
# Force closing of the poll so that we can call getWinners().
poll.datecloses = datetime.now(pytz.UTC)
self.failUnless(poll.getWinners() is None, poll.getWinners())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_token_creation.py'
--- lib/canonical/launchpad/tests/test_token_creation.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/tests/test_token_creation.py 2011-08-12 12:59:24 +0000
@@ -44,7 +44,3 @@
random.seed(0)
token3 = create_unique_token_for_table(99, LoginToken.token)
self.assertNotEquals(token1, token3)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/tests/test_webapp_authorization.py'
--- lib/canonical/launchpad/tests/test_webapp_authorization.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/tests/test_webapp_authorization.py 2011-08-12 12:59:24 +0000
@@ -3,7 +3,7 @@
__metaclass__ = type
-import unittest
+from unittest import TestCase
from zope.component import provideAdapter
from zope.interface import (
@@ -22,7 +22,7 @@
class TestLaunchpadSecurityPolicy_getPrincipalsAccessLevel(
- CleanUp, unittest.TestCase):
+ CleanUp, TestCase):
def setUp(self):
self.principal = LaunchpadPrincipal(
@@ -85,7 +85,3 @@
def adapt_loneobject_to_container(loneobj):
"""Adapt a LoneObject to an `ILaunchpadContainer`."""
return loneobj
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_authorization.py'
--- lib/canonical/launchpad/webapp/tests/test_authorization.py 2011-04-27 16:14:32 +0000
+++ lib/canonical/launchpad/webapp/tests/test_authorization.py 2011-08-12 12:59:24 +0000
@@ -357,7 +357,3 @@
# Confirm that the objects have the permission set.
self.assertTrue(check_permission('launchpad.View', objects[0]))
self.assertTrue(check_permission('launchpad.View', objects[1]))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_authutility.py'
--- lib/canonical/launchpad/webapp/tests/test_authutility.py 2010-10-21 04:19:36 +0000
+++ lib/canonical/launchpad/webapp/tests/test_authutility.py 2011-08-12 12:59:24 +0000
@@ -115,8 +115,3 @@
def test_getPrincipalByLogin(self):
authsvc, request = self._make('bruce', 'bruce!')
self.assertEqual(authsvc.getPrincipalByLogin('bruce'), Bruce)
-
-
-def test_suite():
- t = unittest.makeSuite(TestPlacelessAuth)
- return unittest.TestSuite((t,))
=== modified file 'lib/canonical/launchpad/webapp/tests/test_batching.py'
--- lib/canonical/launchpad/webapp/tests/test_batching.py 2011-08-08 10:51:27 +0000
+++ lib/canonical/launchpad/webapp/tests/test_batching.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
from datetime import datetime
import pytz
import simplejson
-from unittest import TestLoader
from lazr.batchnavigator.interfaces import IRangeFactory
from storm.expr import (
@@ -569,7 +568,3 @@
range_factory = StormRangeFactory(resultset)
sliced_result = range_factory.getSlice(3, memo)
self.assertEqual(all_results[1:4], list(sliced_result))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_breadcrumbs.py'
--- lib/canonical/launchpad/webapp/tests/test_breadcrumbs.py 2011-05-27 21:12:25 +0000
+++ lib/canonical/launchpad/webapp/tests/test_breadcrumbs.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.i18nmessageid import Message
from zope.interface import implements
@@ -139,7 +137,3 @@
[distro_url, distroseries_url, package_url, package_bugs_url,
self.package_bugtask_url],
self.package_bugtask)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_dbpolicy.py'
--- lib/canonical/launchpad/webapp/tests/test_dbpolicy.py 2010-10-21 04:19:36 +0000
+++ lib/canonical/launchpad/webapp/tests/test_dbpolicy.py 2011-08-12 12:59:24 +0000
@@ -6,8 +6,6 @@
__metaclass__ = type
__all__ = []
-import unittest
-
from lazr.restful.interfaces import IWebServiceConfiguration
from zope.component import (
getAdapter,
@@ -292,7 +290,3 @@
self.assertRaises(
ReadOnlyModeDisallowedStore,
store_selector.get, store, MASTER_FLAVOR)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_encryptor.py'
--- lib/canonical/launchpad/webapp/tests/test_encryptor.py 2010-10-21 04:19:36 +0000
+++ lib/canonical/launchpad/webapp/tests/test_encryptor.py 2011-08-12 12:59:24 +0000
@@ -61,8 +61,3 @@
pass
else:
self.fail("uncaught non-ascii text")
-
-
-def test_suite():
- t = unittest.makeSuite(TestSSHADigestEncryptor)
- return unittest.TestSuite((t,))
=== modified file 'lib/canonical/launchpad/webapp/tests/test_errorlog.py'
--- lib/canonical/launchpad/webapp/tests/test_errorlog.py 2011-08-10 06:50:52 +0000
+++ lib/canonical/launchpad/webapp/tests/test_errorlog.py 2011-08-12 12:59:24 +0000
@@ -16,7 +16,6 @@
import tempfile
from textwrap import dedent
import traceback
-import unittest
from lazr.batchnavigator.interfaces import InvalidBatchSizeError
from lazr.restful.declarations import error_status
@@ -1044,7 +1043,3 @@
customize_get_converter(module)
converter = module.get_converter('int')
self.assertTrue(converter is None)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_initialization.py'
--- lib/canonical/launchpad/webapp/tests/test_initialization.py 2011-07-19 00:35:12 +0000
+++ lib/canonical/launchpad/webapp/tests/test_initialization.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
As found in canonical.launchpad.webapp.initialization.py."""
-import unittest
-
from zope.component import getSiteManager
from zope.interface import Interface
from zope.publisher.interfaces.browser import IBrowserRequest
@@ -57,8 +55,3 @@
pass
else:
self.assertNotEqual(factory, not_the_namespace_factory)
-
-
-def test_suite():
- suite = unittest.TestLoader().loadTestsFromName(__name__)
- return suite
=== modified file 'lib/canonical/launchpad/webapp/tests/test_loginsource.py'
--- lib/canonical/launchpad/webapp/tests/test_loginsource.py 2010-12-09 07:14:34 +0000
+++ lib/canonical/launchpad/webapp/tests/test_loginsource.py 2011-08-12 12:59:24 +0000
@@ -44,7 +44,3 @@
principal = self.login_source.getPrincipalByLogin(
removeSecurityProxy(self.mark).preferredemail.email, AccessLevel.READ_PUBLIC)
self.assertEqual(principal.access_level, AccessLevel.READ_PUBLIC)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_menu.py'
--- lib/canonical/launchpad/webapp/tests/test_menu.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/webapp/tests/test_menu.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.security.management import newInteraction
from canonical.launchpad.webapp.menu import (
@@ -85,7 +83,3 @@
self.assertEquals(len(cache.keys()), 1)
self.assertContentEqual(
cache.keys()[0], (menu.__class__, context, 'test_link'))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/webapp/tests/test_pgsession.py'
--- lib/canonical/launchpad/webapp/tests/test_pgsession.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/launchpad/webapp/tests/test_pgsession.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,9 @@
__metaclass__ = type
+from unittest import TestCase
+
from datetime import timedelta
-import unittest
from zope.publisher.browser import TestRequest
from zope.security.management import (
@@ -37,7 +38,7 @@
return self.value == obj.value
-class TestPgSession(unittest.TestCase):
+class TestPgSession(TestCase):
dbuser = 'session'
layer = LaunchpadFunctionalLayer
@@ -166,8 +167,3 @@
# also see the page test xx-no-anonymous-session-cookies for tests of
# the cookie behavior.
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestPgSession))
- return suite
=== modified file 'lib/canonical/launchpad/webapp/tests/test_session.py'
--- lib/canonical/launchpad/webapp/tests/test_session.py 2011-04-21 02:10:29 +0000
+++ lib/canonical/launchpad/webapp/tests/test_session.py 2011-08-12 12:59:24 +0000
@@ -38,7 +38,3 @@
'.launchpad.dev')
self.assertEqual(get_cookie_domain('bugs.launchpad.dev'),
'.launchpad.dev')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/launchpad/xmlrpc/tests/test_authserver.py'
--- lib/canonical/launchpad/xmlrpc/tests/test_authserver.py 2010-10-20 20:51:26 +0000
+++ lib/canonical/launchpad/xmlrpc/tests/test_authserver.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from zope.publisher.xmlrpc import TestRequest
@@ -55,7 +53,3 @@
dict(id=new_person.id, name=new_person.name,
keys=[(key.keytype.title, key.keytext)]),
self.authserver.getUserAndSSHKeys(new_person.name))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/librarian/ftests/test_client.py'
--- lib/canonical/librarian/ftests/test_client.py 2011-06-01 15:01:45 +0000
+++ lib/canonical/librarian/ftests/test_client.py 2011-08-12 12:59:24 +0000
@@ -297,7 +297,3 @@
client.getFileByAlias(alias_id), 'This is a fake file object', 3)
client_module._File = _File
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/librarian/ftests/test_db.py'
--- lib/canonical/librarian/ftests/test_db.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/librarian/ftests/test_db.py 2011-08-12 12:59:24 +0000
@@ -149,7 +149,3 @@
(1, u'netapplet-1.0.0.tar.gz', u'application/x-gtar'),
]
self.assertEqual(expected_aliases, aliases)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/librarian/ftests/test_gc.py'
--- lib/canonical/librarian/ftests/test_gc.py 2011-07-01 10:27:44 +0000
+++ lib/canonical/librarian/ftests/test_gc.py 2011-08-12 12:59:24 +0000
@@ -12,7 +12,6 @@
from subprocess import Popen, PIPE, STDOUT
import sys
import tempfile
-from unittest import TestLoader
from sqlobject import SQLObjectNotFound
import transaction
@@ -870,7 +869,3 @@
))
count = cur.fetchone()[0]
self.failIfEqual(count, 2)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/canonical/librarian/ftests/test_storage.py'
--- lib/canonical/librarian/ftests/test_storage.py 2010-11-06 12:50:22 +0000
+++ lib/canonical/librarian/ftests/test_storage.py 2011-08-12 12:59:24 +0000
@@ -122,10 +122,3 @@
flush_database_updates()
# And no errors should have been raised!
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(LibrarianStorageDBTests))
- return suite
-
=== modified file 'lib/canonical/librarian/tests/test_storage.py'
--- lib/canonical/librarian/tests/test_storage.py 2010-10-04 19:50:45 +0000
+++ lib/canonical/librarian/tests/test_storage.py 2011-08-12 12:59:24 +0000
@@ -144,10 +144,3 @@
def add(self, digest, size):
self.id += 1
return self.id
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(LibrarianStorageTestCase))
- return suite
-
=== modified file 'lib/canonical/librarian/tests/test_utils.py'
--- lib/canonical/librarian/tests/test_utils.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/librarian/tests/test_utils.py 2011-08-12 12:59:24 +0000
@@ -39,8 +39,3 @@
'foo.diff.gz', 'will_be_overridden')
self.assertEqual(encoding, 'gzip')
self.assertEqual(mimetype, 'text/plain')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/canonical/testing/ftests/test_mockdb.py'
--- lib/canonical/testing/ftests/test_mockdb.py 2011-02-19 13:50:19 +0000
+++ lib/canonical/testing/ftests/test_mockdb.py 2011-08-12 12:59:24 +0000
@@ -544,9 +544,3 @@
# Now the results are exhausted, fetchall() should return an
# empty list.
self.failUnlessEqual(cur.fetchall(), [])
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(MockDbTestCase))
- return suite
=== modified file 'lib/devscripts/ec2test/tests/test_ec2instance.py'
--- lib/devscripts/ec2test/tests/test_ec2instance.py 2010-02-15 15:04:40 +0000
+++ lib/devscripts/ec2test/tests/test_ec2instance.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,7 @@
__metaclass__ = type
-from unittest import TestCase, TestLoader
+from unittest import TestCase
from lp.testing.fakemethod import FakeMethod
@@ -137,7 +137,3 @@
self._runInstance(instance, runnee=runnee, headless=True)
self.assertEqual(1, instance.shutdown.call_count)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/devscripts/tests/test_autoland.py'
--- lib/devscripts/tests/test_autoland.py 2011-03-31 12:57:02 +0000
+++ lib/devscripts/tests/test_autoland.py 2011-08-12 12:59:24 +0000
@@ -504,7 +504,3 @@
# Any unrecognized URL will raise a ValueError.
self.assertRaises(
ValueError, get_bazaar_host, 'https://api.lunchpad.net')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/devscripts/tests/test_sourcecode.py'
--- lib/devscripts/tests/test_sourcecode.py 2009-11-24 23:10:00 +0000
+++ lib/devscripts/tests/test_sourcecode.py 2011-08-12 12:59:24 +0000
@@ -206,7 +206,3 @@
some_file.write('hello\n')
some_file.close()
self.assertEqual([], list(find_branches(directory)))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/launchpad_loggerhead/tests.py'
--- lib/launchpad_loggerhead/tests.py 2011-03-31 03:31:15 +0000
+++ lib/launchpad_loggerhead/tests.py 2011-08-12 12:59:24 +0000
@@ -4,7 +4,6 @@
import cStringIO
import errno
import logging
-import unittest
import urllib
import socket
import re
@@ -303,7 +302,3 @@
self.assertTrue(self.start_response_called)
# Output content is empty because of no_body_app
self.assertEqual('', ''.join(self._response_chunks))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/answers/browser/tests/test_menus.py'
--- lib/lp/answers/browser/tests/test_menus.py 2011-05-09 16:35:10 +0000
+++ lib/lp/answers/browser/tests/test_menus.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -51,13 +49,3 @@
self.question.linkFAQ(self.person, faq, 'message')
link = menu.linkfaq()
self.assertEqual('edit', link.icon)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
-
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(test_suite())
=== modified file 'lib/lp/app/browser/tests/test_launchpad.py'
--- lib/lp/app/browser/tests/test_launchpad.py 2011-06-27 15:36:25 +0000
+++ lib/lp/app/browser/tests/test_launchpad.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from zope.publisher.interfaces import NotFound
from zope.security.interfaces import Unauthorized
@@ -427,7 +425,3 @@
view = create_view(error, 'index.html')
self.assertEqual('Error: Page gone', view.page_title)
self.assertEqual(410, view.request.response.getStatus())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/blueprints/browser/tests/test_menus.py'
--- lib/lp/blueprints/browser/tests/test_menus.py 2010-08-20 20:31:18 +0000
+++ lib/lp/blueprints/browser/tests/test_menus.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.blueprints.browser.specification import (
SpecificationActionMenu,
@@ -29,13 +27,3 @@
def test_SpecificationActionMenu(self):
menu = SpecificationActionMenu(self.specification)
self.assertTrue(check_menu_links(menu))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
-
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(test_suite())
=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py 2011-05-17 17:28:42 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py 2011-08-12 12:59:24 +0000
@@ -296,12 +296,3 @@
blueprint, ISpecification['completer'], None)
expected = format_link(user) + ' on 2011-01-01'
self.assertThat(repr_method(), Equals(expected))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(test_suite())
=== modified file 'lib/lp/blueprints/browser/tests/test_specificationdependency.py'
--- lib/lp/blueprints/browser/tests/test_specificationdependency.py 2010-10-04 19:50:45 +0000
+++ lib/lp/blueprints/browser/tests/test_specificationdependency.py 2011-08-12 12:59:24 +0000
@@ -8,8 +8,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp import canonical_url
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import BrowserTestCase
@@ -27,7 +25,3 @@
browser.getControl('Depends On').value = canonical_url(dependency)
browser.getControl('Continue').click()
self.assertIn(dependency, spec.dependencies)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/browser/tests/test_bugview.py'
--- lib/lp/bugs/browser/tests/test_bugview.py 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/browser/tests/test_bugview.py 2011-08-12 12:59:24 +0000
@@ -3,9 +3,6 @@
__metaclass__ = type
-
-import unittest
-
from zope.security.proxy import removeSecurityProxy
from canonical.launchpad.ftests import login
@@ -55,13 +52,3 @@
['patch'],
[attachment['attachment'].title
for attachment in self.view.patches])
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestBugView))
- return suite
-
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(test_suite())
=== modified file 'lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py'
--- lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.ftests import (
ANONYMOUS,
login,
@@ -96,15 +94,3 @@
def getOwner(self):
return self.target.distribution.owner
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TestConfigureBugTrackerProduct))
- suite.addTest(unittest.makeSuite(TestConfigureBugTrackerDistro))
- suite.addTest(unittest.makeSuite(TestConfigureBugTrackerDSP))
- return suite
-
-
-if __name__ == '__main__':
- unittest.TextTestRunner().run(test_suite())
=== modified file 'lib/lp/bugs/mail/tests/test_bug_duplicate_notifications.py'
--- lib/lp/bugs/mail/tests/test_bug_duplicate_notifications.py 2011-05-31 19:45:53 +0000
+++ lib/lp/bugs/mail/tests/test_bug_duplicate_notifications.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for notification strings of duplicate Bugs."""
-from unittest import TestLoader
-
from lazr.lifecycle.event import ObjectModifiedEvent
from lazr.lifecycle.snapshot import Snapshot
import transaction
@@ -59,7 +57,3 @@
rationale = 'duplicate bug report (%i)' % self.dup_bug.id
msg = stub.test_emails[-1][2]
self.assertIn(rationale, msg)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/mail/tests/test_bug_subscribe.py'
--- lib/lp/bugs/mail/tests/test_bug_subscribe.py 2010-10-04 19:50:45 +0000
+++ lib/lp/bugs/mail/tests/test_bug_subscribe.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for Bug subscription-related email tests."""
-from unittest import TestLoader
-
import transaction
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -63,7 +61,3 @@
person_subscribed, person_subscribing)
transaction.commit()
self.assertEqual(len(stub.test_emails), 0)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/mail/tests/test_bug_task_assignment.py'
--- lib/lp/bugs/mail/tests/test_bug_task_assignment.py 2011-02-17 17:12:18 +0000
+++ lib/lp/bugs/mail/tests/test_bug_task_assignment.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for Bug task assignment-related email tests."""
-from unittest import TestLoader
-
from lazr.lifecycle.event import ObjectModifiedEvent
from lazr.lifecycle.snapshot import Snapshot
import transaction
@@ -114,7 +112,3 @@
receivers = [message['To'] for message in messages]
self.assertFalse(self.team_member_email in receivers,
'Team member was emailed about the bug task change')
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/mail/tests/test_bug_task_modification.py'
--- lib/lp/bugs/mail/tests/test_bug_task_modification.py 2011-02-17 17:12:18 +0000
+++ lib/lp/bugs/mail/tests/test_bug_task_modification.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Test for emails sent after bug task modification."""
-from unittest import TestLoader
-
from lazr.lifecycle.event import ObjectModifiedEvent
from lazr.lifecycle.snapshot import Snapshot
import transaction
@@ -50,7 +48,3 @@
'email notification not created')
headers = [msg['X-Launchpad-Bug-Modifier'] for msg in messages]
self.assertEqual(len(headers), len(messages))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_base.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_base.py 2011-03-11 03:19:07 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_base.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from contextlib import contextmanager
-import unittest
import transaction
@@ -171,7 +170,3 @@
def test_sql_log_cleared_after_error(self):
with self._test_sql_log_cleared_after_x() as base:
base.error("Numpty on deck.")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py 2011-03-23 16:28:51 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_bugwatchupdater.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from datetime import datetime
-import unittest
import transaction
@@ -257,7 +256,3 @@
self.assertFalse(bug_watch_updater.import_bug_comments_called)
self.assertFalse(bug_watch_updater.push_bug_comments_called)
self.assertFalse(bug_watch_updater.link_launchpad_bug_called)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_core.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_core.py 2011-08-01 05:25:59 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_core.py 2011-08-12 12:59:24 +0000
@@ -512,7 +512,3 @@
"getRemoteStatus(bug_id=u'strawberry-2')",
"getRemoteStatus(bug_id=u'strawberry-3')"],
output_file.output['strawberry'])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py'
--- lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py 2010-12-20 03:21:03 +0000
+++ lib/lp/bugs/scripts/checkwatches/tests/test_scheduler.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
datetime,
timedelta,
)
-import unittest
from pytz import utc
import transaction
@@ -106,7 +105,3 @@
self.scheduler(1)
self.assertEqual(next_check_date, self.bug_watch.next_check)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/scripts/tests/test_bugimport.py'
--- lib/lp/bugs/scripts/tests/test_bugimport.py 2010-12-16 17:01:06 +0000
+++ lib/lp/bugs/scripts/tests/test_bugimport.py 2011-08-12 12:59:24 +0000
@@ -1034,7 +1034,3 @@
self.assertNotEqual(bugtask.status, BugTaskStatus.FIXRELEASED)
for bugtask in test_bug_two.bugtasks:
self.assertEqual(bugtask.status, BugTaskStatus.FIXRELEASED)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/tests/test_duplicate_handling.py'
--- lib/lp/bugs/tests/test_duplicate_handling.py 2011-04-29 14:22:01 +0000
+++ lib/lp/bugs/tests/test_duplicate_handling.py 2011-08-12 12:59:24 +0000
@@ -4,7 +4,6 @@
"""Tests for bug duplicate validation."""
from textwrap import dedent
-import unittest
from zope.security.interfaces import ForbiddenAttribute
@@ -162,7 +161,3 @@
# and one common target, i.e., N+3 targets for N duplicates.
self.assertEqual(5, self.moveDuplicates(2, with_random_target=True))
self.assertEqual(7, self.moveDuplicates(4, with_random_target=True))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/bugs/windmill/tests/test_bug_me_too.py'
--- lib/lp/bugs/windmill/tests/test_bug_me_too.py 2011-03-29 05:59:29 +0000
+++ lib/lp/bugs/windmill/tests/test_bug_me_too.py 2011-08-12 12:59:24 +0000
@@ -2,7 +2,6 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
from itertools import count
-import unittest
from windmill.authoring import WindmillTestClientException
@@ -120,6 +119,3 @@
client.asserts.assertText(
xpath=VALUE_LOCATION_XPATH,
validator=u"This bug affects you")
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/adapters/tests/test_branch.py'
--- lib/lp/code/adapters/tests/test_branch.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/adapters/tests/test_branch.py 2011-08-12 12:59:24 +0000
@@ -3,10 +3,7 @@
"""Functional tests for branch-related components"""
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from canonical.launchpad.ftests import login
from canonical.testing.layers import LaunchpadFunctionalLayer
@@ -61,7 +58,3 @@
{'old': BranchMergeProposalStatus.WORK_IN_PROGRESS,
'new': BranchMergeProposalStatus.MERGED},
delta.queue_status)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposal.py'
--- lib/lp/code/browser/tests/test_branchmergeproposal.py 2011-08-05 18:46:39 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposal.py 2011-08-12 12:59:24 +0000
@@ -14,7 +14,6 @@
timedelta,
)
from difflib import unified_diff
-import unittest
import pytz
from soupmatchers import HTMLContains, Tag
@@ -1091,7 +1090,3 @@
datetime(year=2008, month=10, day=10, tzinfo=pytz.UTC)))
self.assertEqual(
[bmp2], latest_proposals_for_each_branch([bmp1, bmp2]))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py'
--- lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2011-08-08 18:23:06 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from datetime import datetime
-from unittest import TestLoader
import pytz
import transaction
@@ -360,7 +359,3 @@
self.assertEqual(
[bmp3, bmp2, bmp1],
[item.context for item in view.review_groups[view.OTHER]])
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_branchsubscription.py'
--- lib/lp/code/browser/tests/test_branchsubscription.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/browser/tests/test_branchsubscription.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.interfaces import IPrimaryContext
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import TestCaseWithFactory
@@ -24,7 +22,3 @@
self.assertEqual(
IPrimaryContext(subscription).context,
IPrimaryContext(subscription.branch).context)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_breadcrumbs.py'
--- lib/lp/code/browser/tests/test_breadcrumbs.py 2010-04-28 10:13:00 +0000
+++ lib/lp/code/browser/tests/test_breadcrumbs.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
@@ -19,7 +17,3 @@
('apollo',
'http://code.launchpad.dev/+code-imports/+machines/apollo')]
self.assertBreadcrumbs(expected, machine)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_codeimport.py'
--- lib/lp/code/browser/tests/test_codeimport.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/browser/tests/test_codeimport.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import re
-import unittest
from canonical.launchpad.testing.pages import (
extract_text,
@@ -54,9 +53,3 @@
svn_details = find_tag_by_id(browser.contents, 'svn-import-details')
self.assertSvnDetailsDisplayed(
svn_details, RevisionControlSystems.SVN)
-
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/browser/tests/test_codereviewcomment.py'
--- lib/lp/code/browser/tests/test_codereviewcomment.py 2010-10-26 15:47:24 +0000
+++ lib/lp/code/browser/tests/test_codereviewcomment.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.interfaces import IPrimaryContext
from canonical.launchpad.webapp.testing import verifyObject
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -46,7 +44,3 @@
display_comment = CodeReviewDisplayComment(comment)
verifyObject(ICodeReviewDisplayComment, display_comment)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_codereviewvote.py'
--- lib/lp/code/browser/tests/test_codereviewvote.py 2010-10-26 15:47:24 +0000
+++ lib/lp/code/browser/tests/test_codereviewvote.py 2011-08-12 12:59:24 +0000
@@ -5,9 +5,6 @@
__metaclass__ = type
-
-import unittest
-
from canonical.launchpad.webapp import canonical_url
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import (
@@ -46,7 +43,3 @@
with person_logged_in(reviewer):
view = create_initialized_view(vote, '+reassign')
self.assertEqual(canonical_url(bmp), view.cancel_url)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_diff.py'
--- lib/lp/code/browser/tests/test_diff.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/browser/tests/test_diff.py 2011-08-12 12:59:24 +0000
@@ -3,9 +3,6 @@
"""Unit tests for DiffView."""
-
-from unittest import TestLoader
-
from canonical.testing.layers import LaunchpadFunctionalLayer
from lp.code.browser.diff import PreviewDiffFormatterAPI
from lp.testing import TestCaseWithFactory
@@ -35,7 +32,3 @@
self.assertEqual('bork', diff.conflicts)
formatter = PreviewDiffFormatterAPI(diff)
self.assertIn('has conflicts', formatter.link(None))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_product.py'
--- lib/lp/code/browser/tests/test_product.py 2010-10-19 14:09:17 +0000
+++ lib/lp/code/browser/tests/test_product.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
datetime,
timedelta,
)
-import unittest
from mechanize import LinkNotFoundError
import pytz
from zope.component import getUtility
@@ -357,7 +356,3 @@
login_person(product.owner)
view = create_view(product, '+branches', layer=CodeLayer)
self.assertEqual(True, view.can_configure_branches())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/browser/tests/test_tales.py'
--- lib/lp/code/browser/tests/test_tales.py 2011-01-11 04:12:33 +0000
+++ lib/lp/code/browser/tests/test_tales.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from difflib import unified_diff
-import unittest
from storm.store import Store
from testtools.matchers import Equals
@@ -209,8 +208,3 @@
Equals(
'<a href="%s">build for deleted recipe [eric/ppa]</a>'
% (canonical_url(build, path_only_if_possible=True), )))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py'
--- lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py 2011-02-02 15:43:31 +0000
+++ lib/lp/code/browser/widgets/tests/test_branchpopupwidget.py 2011-08-12 12:59:24 +0000
@@ -225,7 +225,3 @@
# XXX: JonathanLange 2008-04-17 bug=219019: Not sure how to test what
# happens when this widget has a good value but other fields have bad
# values. The correct behavior is to *not* create the branch.
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/feed/tests/test_revision.py'
--- lib/lp/code/feed/tests/test_revision.py 2010-08-20 20:31:18 +0000
+++ lib/lp/code/feed/tests/test_revision.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from datetime import datetime
-import unittest
from pytz import UTC
from zope.component import getUtility
@@ -141,7 +140,3 @@
branch.destroySelf()
feed = self._createFeed(product)
self.assertEqual([], feed.getItems())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/interfaces/tests/test_branch.py'
--- lib/lp/code/interfaces/tests/test_branch.py 2011-06-02 19:27:36 +0000
+++ lib/lp/code/interfaces/tests/test_branch.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from bzrlib.branch import BranchFormat as BzrBranchFormat
from bzrlib.bzrdir import BzrProber
from bzrlib.repository import format_registry as repo_format_registry
@@ -60,7 +58,3 @@
description = description[:-1]
self.assertTrue(len(description.split('\n')) == 1,
item.description)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/mail/tests/test_branch.py'
--- lib/lp/code/mail/tests/test_branch.py 2011-03-04 01:16:03 +0000
+++ lib/lp/code/mail/tests/test_branch.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for Branch-related mailings"""
-from unittest import TestLoader
-
from zope.security.proxy import removeSecurityProxy
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -267,7 +265,3 @@
branch.owner).preferredemail.email
self.assertEqual('Testing %j foo', mailer._getSubject(
branch_owner_email, branch.owner))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py'
--- lib/lp/code/mail/tests/test_branchmergeproposal.py 2011-03-04 01:04:06 +0000
+++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
from difflib import unified_diff
import operator
from textwrap import dedent
-from unittest import TestLoader
from lazr.lifecycle.event import ObjectModifiedEvent
from lazr.lifecycle.snapshot import Snapshot
@@ -671,7 +670,3 @@
expected_email = '%s <%s>' % (
candidate.displayname, candidate.preferredemail.email)
self.assertEmailHeadersEqual(expected_email, mails[0]['To'])
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/mail/tests/test_codeimport.py'
--- lib/lp/code/mail/tests/test_codeimport.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/mail/tests/test_codeimport.py 2011-08-12 12:59:24 +0000
@@ -4,7 +4,6 @@
"""Tests for code import related mailings"""
from email import message_from_string
-from unittest import TestLoader
import transaction
@@ -141,7 +140,3 @@
'\n'
'-- \nYou are getting this email because you are a member of the '
'vcs-imports team.\n', msg.get_payload(decode=True))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py 2011-07-01 19:17:03 +0000
+++ lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
from datetime import timedelta
-from unittest import TestLoader
from storm.locals import Store
from zope.security.proxy import removeSecurityProxy
@@ -126,7 +125,3 @@
upload_log_fragment = 'Upload Log: %s' % build.upload_log_url
ctrl = self.makeStatusEmail(build)
self.assertTrue(upload_log_fragment in ctrl.body)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchcloud.py'
--- lib/lp/code/model/tests/test_branchcloud.py 2010-08-31 01:18:35 +0000
+++ lib/lp/code/model/tests/test_branchcloud.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
from datetime import datetime, timedelta
import transaction
-import unittest
import pytz
from storm.locals import Store
@@ -148,8 +147,3 @@
[product3.name, product2.name],
[name for name, commits, count, last_commit
in self.getProductsWithInfo(num_products=2)])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/model/tests/test_branchcollection.py'
--- lib/lp/code/model/tests/test_branchcollection.py 2011-08-03 11:00:11 +0000
+++ lib/lp/code/model/tests/test_branchcollection.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from datetime import datetime
-import unittest
import pytz
from zope.component import getUtility
@@ -1204,7 +1203,3 @@
*DEFAULT_BRANCH_STATUS_IN_LISTING)
person_count, team_count = collection.ownerCounts()
self.assertEqual(1, person_count)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
--- lib/lp/code/model/tests/test_branchjob.py 2011-05-23 11:06:50 +0000
+++ lib/lp/code/model/tests/test_branchjob.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import os
import shutil
import tempfile
-from unittest import TestLoader
from bzrlib import errors as bzr_errors
from bzrlib.branch import (
@@ -1428,7 +1427,3 @@
os.makedirs(branch_path)
self.runReadyJobs()
self.assertFalse(os.path.exists(branch_path))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py'
--- lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py 2011-05-27 21:12:25 +0000
+++ lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py 2011-08-12 12:59:24 +0000
@@ -5,9 +5,6 @@
__metaclass__ = type
-
-from unittest import TestLoader
-
from storm.store import Store
from zope.component import getUtility
@@ -160,7 +157,3 @@
# Nor does getting the path or displayname.
self.assertStatementCount(0, getattr, sp, "displayname")
self.assertStatementCount(0, getattr, sp, "path")
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchlookup.py'
--- lib/lp/code/model/tests/test_branchlookup.py 2011-08-03 11:00:11 +0000
+++ lib/lp/code/model/tests/test_branchlookup.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from lazr.uri import URI
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -708,7 +706,3 @@
result = self.branch_lookup.getByLPPath(
'%s/other/bits' % package.path)
self.assertEqual((branch, u'other/bits'), result)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchmergeproposaljobs.py'
--- lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2010-12-02 16:13:51 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
datetime,
timedelta,
)
-import unittest
from lazr.lifecycle.event import ObjectModifiedEvent
import pytz
@@ -533,7 +532,3 @@
self.assertEqual(
'emailing subscribers about merge proposal changes',
job.getOperationDescription())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchnamespace.py'
--- lib/lp/code/model/tests/test_branchnamespace.py 2011-08-03 11:00:11 +0000
+++ lib/lp/code/model/tests/test_branchnamespace.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -1949,7 +1947,3 @@
self.assertEqual(team, branch.owner)
# And for paranoia.
self.assertNamespacesEqual(namespace, branch.namespace)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchnavigationmenu.py'
--- lib/lp/code/model/tests/test_branchnavigationmenu.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/model/tests/test_branchnavigationmenu.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from canonical.testing.layers import LaunchpadZopelessLayer
from lp.code.interfaces.branch import IBranchNavigationMenu
from lp.testing import TestCaseWithFactory
@@ -35,8 +33,3 @@
"""Review comments implement IBranchNavigation"""
comment = self.factory.makeCodeReviewComment()
self.assertTrue(IBranchNavigationMenu.providedBy(comment))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/model/tests/test_branchpuller.py'
--- lib/lp/code/model/tests/test_branchpuller.py 2010-11-12 00:18:20 +0000
+++ lib/lp/code/model/tests/test_branchpuller.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
datetime,
timedelta,
)
-import unittest
import pytz
import transaction
@@ -294,9 +293,3 @@
def startMirroring(self, branch):
"""See `AcquireBranchToPullTests`."""
branch.startMirroring()
-
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/model/tests/test_branchtarget.py'
--- lib/lp/code/model/tests/test_branchtarget.py 2011-06-03 16:00:01 +0000
+++ lib/lp/code/model/tests/test_branchtarget.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.security.proxy import removeSecurityProxy
from canonical.launchpad.webapp import canonical_url
@@ -581,7 +579,3 @@
def test_product_branch(self):
branch = self.factory.makeProductBranch()
self.assertEqual(branch.target, IPrimaryContext(branch))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_branchvisibilitypolicy.py'
--- lib/lp/code/model/tests/test_branchvisibilitypolicy.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/model/tests/test_branchvisibilitypolicy.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.testing import verifyObject
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.code.enums import BranchVisibilityRule
@@ -108,7 +106,3 @@
InvalidVisibilityPolicy,
product.setBranchVisibilityTeamPolicy,
team, BranchVisibilityRule.FORBIDDEN)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_codeimport.py'
--- lib/lp/code/model/tests/test_codeimport.py 2011-05-27 21:12:25 +0000
+++ lib/lp/code/model/tests/test_codeimport.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
datetime,
timedelta,
)
-import unittest
import pytz
from sqlobject import SQLObjectNotFound
@@ -702,7 +701,3 @@
self.assertRaises(
CodeImportAlreadyRunning, code_import.requestImport,
requester)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_codeimportmachine.py'
--- lib/lp/code/model/tests/test_codeimportmachine.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/model/tests/test_codeimportmachine.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
Other tests are in codeimport-machine.txt."""
-import unittest
-
from zope.component import getUtility
from canonical.database.constants import UTC_NOW
@@ -86,7 +84,3 @@
# When the machine is online, the heartbeat is updated.
self.machine.shouldLookForJob(10)
self.assertSqlAttributeEqualsDate(self.machine, 'heartbeat', UTC_NOW)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_codereviewcomment.py'
--- lib/lp/code/model/tests/test_codereviewcomment.py 2011-05-12 21:33:10 +0000
+++ lib/lp/code/model/tests/test_codereviewcomment.py 2011-08-12 12:59:24 +0000
@@ -4,7 +4,6 @@
"""Unit tests for CodeReviewComment"""
from textwrap import dedent
-import unittest
from lp.services.messages.model.message import MessageSet
from canonical.testing.layers import (
@@ -242,7 +241,3 @@
def test_trailing_whitespace(self):
# Trailing whitespace is removed.
self.assertEqual('> foo', quote_text_as_email(' foo \n '))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_codereviewkarma.py'
--- lib/lp/code/model/tests/test_codereviewkarma.py 2011-05-27 21:53:34 +0000
+++ lib/lp/code/model/tests/test_codereviewkarma.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from canonical.launchpad.ftests import login_person
from canonical.launchpad.ftests.event import TestEventListener
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -146,7 +144,3 @@
self.karma_events = []
proposal.rejectBranch(reviewer, "A rev id.")
self.assertOneKarmaEvent(reviewer, 'branchmergerejectedown')
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_codereviewvote.py'
--- lib/lp/code/model/tests/test_codereviewvote.py 2011-05-03 15:59:06 +0000
+++ lib/lp/code/model/tests/test_codereviewvote.py 2011-08-12 12:59:24 +0000
@@ -1,8 +1,6 @@
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from unittest import TestLoader
-
from zope.security.interfaces import Unauthorized
from canonical.database.constants import UTC_NOW
@@ -266,7 +264,3 @@
reviewer=reviewer_team, registrant=bmp.registrant)
review.reassignReview(reviewer_team)
self.assertEqual(reviewer_team, review.reviewer)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_diff.py'
--- lib/lp/code/model/tests/test_diff.py 2010-12-02 16:13:51 +0000
+++ lib/lp/code/model/tests/test_diff.py 2011-08-12 12:59:24 +0000
@@ -5,11 +5,9 @@
__metaclass__ = type
-
from cStringIO import StringIO
from difflib import unified_diff
import logging
-from unittest import TestLoader
from bzrlib import trace
from bzrlib.patches import (
@@ -608,7 +606,3 @@
inserted, removed = self.diff_changes(incremental_diff.text)
self.assertEqual(['c\n'], inserted)
self.assertEqual(['b\n'], removed)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_hasbranches.py'
--- lib/lp/code/model/tests/test_hasbranches.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/model/tests/test_hasbranches.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.code.interfaces.hasbranches import IHasBranches
from lp.testing import TestCaseWithFactory
@@ -31,8 +29,3 @@
# ProjectGroups should implement IHasBranches.
project = self.factory.makeProject()
self.assertProvides(project, IHasBranches)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/code/model/tests/test_hasmergeproposals.py'
--- lib/lp/code/model/tests/test_hasmergeproposals.py 2011-08-08 18:23:06 +0000
+++ lib/lp/code/model/tests/test_hasmergeproposals.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.interface.verify import verifyObject
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.code.interfaces.hasbranches import IHasMergeProposals
@@ -44,7 +42,3 @@
# DistributionSourcePackages should implement IHasMergeProposals.
dsp = self.factory.makeDistributionSourcePackage()
verifyObject(IHasMergeProposals, dsp)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py 2011-05-04 02:41:23 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
from textwrap import dedent
import transaction
-import unittest
from testtools import run_test_with
from testtools.deferredruntest import (
@@ -305,7 +304,3 @@
logger = BufferLogger()
d = defer.maybeDeferred(job.dispatchBuildToSlave, "someid", logger)
return assert_fails_with(d, CannotBuild)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_revision.py'
--- lib/lp/code/model/tests/test_revision.py 2011-02-11 10:35:23 +0000
+++ lib/lp/code/model/tests/test_revision.py 2011-08-12 12:59:24 +0000
@@ -10,10 +10,7 @@
timedelta,
)
import time
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
import psycopg2
import pytz
@@ -929,7 +926,3 @@
self.store.add(cache)
RevisionSet.pruneRevisionCache(1)
self.assertEqual(3, len(self._getRevisionCache()))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/model/tests/test_revisionauthor.py'
--- lib/lp/code/model/tests/test_revisionauthor.py 2010-12-20 21:49:15 +0000
+++ lib/lp/code/model/tests/test_revisionauthor.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
import transaction
from zope.component import getUtility
@@ -208,7 +206,3 @@
# name_without_email is an empty string.
author = RevisionAuthor(name=u'jml@localhost')
self.assertEqual('', author.name_without_email)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/scripts/tests/test_create_merge_proposals.py'
--- lib/lp/code/scripts/tests/test_create_merge_proposals.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/scripts/tests/test_create_merge_proposals.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
"""Test the create_merge_proposals script"""
from cStringIO import StringIO
-import unittest
from bzrlib import errors as bzr_errors
from bzrlib.branch import Branch
@@ -104,7 +103,3 @@
self.assertIn('INFO Job resulted in OOPS:', stderr)
self.assertIn('INFO Ran 0 CreateMergeProposalJobs.\n', stderr)
self.assertEqual('', stdout)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/scripts/tests/test_merge_proposal_jobs.py'
--- lib/lp/code/scripts/tests/test_merge_proposal_jobs.py 2010-12-02 16:13:51 +0000
+++ lib/lp/code/scripts/tests/test_merge_proposal_jobs.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
"""Test the sendbranchmail script"""
-import unittest
-
import transaction
from canonical.launchpad.scripts.tests import run_script
@@ -36,7 +34,3 @@
'INFO Running through Twisted.\n'
'INFO Ran 1 GenerateIncrementalDiffJob jobs.\n', stderr)
self.assertEqual(JobStatus.COMPLETED, job.status)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/scripts/tests/test_reclaim_branch_space.py'
--- lib/lp/code/scripts/tests/test_reclaim_branch_space.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/scripts/tests/test_reclaim_branch_space.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
import datetime
import os
import shutil
-import unittest
import transaction
from zope.component import getUtility
@@ -98,7 +97,3 @@
self.assertIn('INFO Creating lockfile: ', stderr)
self.assertIn('INFO Job resulted in OOPS:', stderr)
self.assertIn('INFO Reclaimed space for 0 branches.\n', stderr)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/scripts/tests/test_revisionkarma.py'
--- lib/lp/code/scripts/tests/test_revisionkarma.py 2010-12-20 21:51:37 +0000
+++ lib/lp/code/scripts/tests/test_revisionkarma.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from storm.store import Store
import transaction
@@ -123,7 +121,3 @@
'test', config.revisionkarma.dbuser, ['-q'])
script.main()
self.assertOneKarmaEvent(author, b2.product)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/scripts/tests/test_sendbranchmail.py'
--- lib/lp/code/scripts/tests/test_sendbranchmail.py 2011-07-18 20:46:27 +0000
+++ lib/lp/code/scripts/tests/test_sendbranchmail.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
"""Test the sendbranchmail script"""
-import unittest
-
import transaction
from canonical.launchpad.scripts.tests import run_script
@@ -97,7 +95,3 @@
stderr)
self.assertEqual('', stdout)
self.assertEqual(0, retcode)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/tests/test_branchurifield.py'
--- lib/lp/code/tests/test_branchurifield.py 2011-02-24 15:30:54 +0000
+++ lib/lp/code/tests/test_branchurifield.py 2011-08-12 12:59:24 +0000
@@ -4,10 +4,6 @@
"""Tests for BranchURIField."""
__metaclass__ = type
-__all__ = []
-
-
-import unittest
from canonical.config import config
from canonical.launchpad.webapp.vhosts import allvhosts
@@ -77,7 +73,3 @@
'codehosting', blacklisted_hostnames='localhost,127.0.0.1')
self.assertInvalid(u'http://localhost/foo/bar')
self.assertInvalid(u'http://127.0.0.1/foo/bar')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/tests/test_project.py'
--- lib/lp/code/tests/test_project.py 2010-10-14 15:21:32 +0000
+++ lib/lp/code/tests/test_project.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import TestCaseWithFactory
@@ -30,7 +28,3 @@
# true for has_branches.
self.factory.makeProductBranch(product=self.product)
self.assertTrue(self.project.has_branches())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/tests/test_seriessourcepackagebranch.py'
--- lib/lp/code/tests/test_seriessourcepackagebranch.py 2011-08-03 11:00:11 +0000
+++ lib/lp/code/tests/test_seriessourcepackagebranch.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from datetime import datetime
-import unittest
import pytz
import transaction
@@ -124,7 +123,3 @@
find_branch_links = getUtility(IFindOfficialBranchLinks)
self.assertEqual(
[], list(find_branch_links.findForSourcePackage(package)))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/vocabularies/tests/test_branch_vocabularies.py'
--- lib/lp/code/vocabularies/tests/test_branch_vocabularies.py 2010-10-04 19:50:45 +0000
+++ lib/lp/code/vocabularies/tests/test_branch_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -5,10 +5,7 @@
__metaclass__ = type
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from zope.component import getUtility
@@ -220,7 +217,3 @@
"""Restrict using a branch on widget."""
return getUtility(IBranchLookup).getByUniqueName(
'~spotty/widget/hill')
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/windmill/tests/test_branch_broken_links.py'
--- lib/lp/code/windmill/tests/test_branch_broken_links.py 2011-02-10 04:00:00 +0000
+++ lib/lp/code/windmill/tests/test_branch_broken_links.py 2011-08-12 12:59:24 +0000
@@ -4,9 +4,6 @@
"""Test for links between branches and bugs or specs."""
__metaclass__ = type
-__all__ = []
-
-import unittest
import transaction
import windmill
@@ -123,7 +120,3 @@
for (href, title) in invalid_links.items():
self.assertEqual(title, result_invalid_links[href])
self.assertEqual(set(valid_links), set(result_valid_links))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/windmill/tests/test_branch_popupdiff.py'
--- lib/lp/code/windmill/tests/test_branch_popupdiff.py 2011-06-27 15:13:24 +0000
+++ lib/lp/code/windmill/tests/test_branch_popupdiff.py 2011-08-12 12:59:24 +0000
@@ -4,9 +4,6 @@
"""Test for the popup diff."""
__metaclass__ = type
-__all__ = []
-
-import unittest
import transaction
import windmill
@@ -136,7 +133,3 @@
client.waits.forElement(xpath=BRANCH_SEARCCH_RESULT)
client.click(xpath=BRANCH_SEARCCH_RESULT)
client.waits.forElement(xpath=POPUP_DIFF)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/code/xmlrpc/tests/test_branch.py'
--- lib/lp/code/xmlrpc/tests/test_branch.py 2010-10-26 15:47:24 +0000
+++ lib/lp/code/xmlrpc/tests/test_branch.py 2011-08-12 12:59:24 +0000
@@ -4,11 +4,8 @@
"""Unit tests for the public codehosting API."""
__metaclass__ = type
-__all__ = []
-
import os
-import unittest
import xmlrpclib
from bzrlib import urlutils
@@ -356,7 +353,3 @@
self.assertFault(
branch.unique_name,
faults.NoUrlForBranch(branch.unique_name))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/codeimport/tests/test_dispatcher.py'
--- lib/lp/codehosting/codeimport/tests/test_dispatcher.py 2010-12-20 03:21:03 +0000
+++ lib/lp/codehosting/codeimport/tests/test_dispatcher.py 2011-08-12 12:59:24 +0000
@@ -11,7 +11,6 @@
import shutil
import socket
import tempfile
-from unittest import TestLoader
from canonical.launchpad import scripts
from canonical.testing.layers import BaseLayer
@@ -166,7 +165,3 @@
dispatcher._getSleepInterval = lambda : interval
dispatcher.findAndDispatchJobs(StubSchedulerClient([10, 0]))
self.assertEqual([interval], sleep_calls)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/codeimport/tests/test_foreigntree.py'
--- lib/lp/codehosting/codeimport/tests/test_foreigntree.py 2010-10-04 19:50:45 +0000
+++ lib/lp/codehosting/codeimport/tests/test_foreigntree.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
import os
import time
-import unittest
from bzrlib.tests import TestCaseWithTransport
import CVS
@@ -204,7 +203,3 @@
tree2.update()
readme_path = os.path.join(tree2.local_path, 'README')
self.assertFileEqual(new_content, readme_path)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/codeimport/tests/test_uifactory.py'
--- lib/lp/codehosting/codeimport/tests/test_uifactory.py 2011-08-02 11:28:46 +0000
+++ lib/lp/codehosting/codeimport/tests/test_uifactory.py 2011-08-12 12:59:24 +0000
@@ -7,8 +7,6 @@
__metaclass__ = type
-import unittest
-
from lp.codehosting.codeimport.uifactory import LoggingUIFactory
from lp.services.log.logger import BufferLogger
from lp.testing import (
@@ -162,7 +160,3 @@
factory = self.makeLoggingUIFactory()
factory.clear_term()
self.assertEqual("", self.logger.getLogBuffer())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2011-07-20 17:20:03 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2011-08-12 12:59:24 +0000
@@ -11,7 +11,6 @@
import subprocess
import tempfile
import time
-import unittest
from bzrlib.branch import (
Branch,
@@ -1158,7 +1157,3 @@
return BzrSvnImportWorker(
source_details, self.get_transport('import_data'),
self.bazaar_store, logging.getLogger())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/codeimport/tests/test_workermonitor.py'
--- lib/lp/codehosting/codeimport/tests/test_workermonitor.py 2011-06-16 23:43:04 +0000
+++ lib/lp/codehosting/codeimport/tests/test_workermonitor.py 2011-08-12 12:59:24 +0000
@@ -12,7 +12,6 @@
import shutil
import StringIO
import tempfile
-import unittest
import urllib
from bzrlib.branch import Branch
@@ -832,7 +831,3 @@
[interpreter, script_path, str(job_id), '-q'],
childFDs={0:0, 1:1, 2:2}, env=os.environ)
return process_end_deferred
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/puller/tests/test_acceptance.py'
--- lib/lp/codehosting/puller/tests/test_acceptance.py 2010-10-20 20:51:26 +0000
+++ lib/lp/codehosting/puller/tests/test_acceptance.py 2011-08-12 12:59:24 +0000
@@ -12,7 +12,6 @@
PIPE,
Popen,
)
-import unittest
from bzrlib import errors
from bzrlib.branch import Branch
@@ -331,7 +330,3 @@
# - different branch exists in new location
# - running puller while another puller is running
# - expected output on non-quiet runs
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/puller/tests/test_errors.py'
--- lib/lp/codehosting/puller/tests/test_errors.py 2011-08-09 15:05:18 +0000
+++ lib/lp/codehosting/puller/tests/test_errors.py 2011-08-12 12:59:24 +0000
@@ -233,8 +233,3 @@
BzrError('A generic bzr error'))
expected_msg = 'A generic bzr error'
self.assertEqual(msg, expected_msg)
-
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/puller/tests/test_scheduler.py'
--- lib/lp/codehosting/puller/tests/test_scheduler.py 2010-12-15 05:37:21 +0000
+++ lib/lp/codehosting/puller/tests/test_scheduler.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import logging
import os
import textwrap
-import unittest
from bzrlib.branch import Branch
from bzrlib.bzrdir import (
@@ -959,7 +958,3 @@
mirror_fails_to_unlock, 1)
return deferred.addErrback(self._dumpError)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/puller/tests/test_worker.py'
--- lib/lp/codehosting/puller/tests/test_worker.py 2011-08-08 15:49:19 +0000
+++ lib/lp/codehosting/puller/tests/test_worker.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import gc
from StringIO import StringIO
-import unittest
import bzrlib.branch
from bzrlib.branch import (
@@ -534,7 +533,3 @@
http_server.get_url() + 'some-other-branch')
b1.pull(b2_http)
self.assertSubset([WORKER_ACTIVITY_NETWORK], p.calls)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/puller/tests/test_worker_formats.py'
--- lib/lp/codehosting/puller/tests/test_worker_formats.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/puller/tests/test_worker_formats.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from bzrlib.branch import Branch
from bzrlib.bzrdir import (
BzrDirFormat6,
@@ -130,7 +128,3 @@
# The mirrored branch should now be in knit format.
self.assertMirrored(
Branch.open(self.worker.source), Branch.open(self.worker.dest))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/scanner/tests/test_buglinks.py'
--- lib/lp/codehosting/scanner/tests/test_buglinks.py 2010-10-26 15:47:24 +0000
+++ lib/lp/codehosting/scanner/tests/test_buglinks.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from bzrlib.revision import Revision
from zope.component import getUtility
from zope.event import notify
@@ -282,7 +280,3 @@
db_branch, tree.branch, db_revision, bzr_revision, revno))
bug_branch = getUtility(IBugBranchSet).getBugBranch(bug, db_branch)
self.assertIsNot(None, bug_branch)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/scanner/tests/test_bzrsync.py'
--- lib/lp/codehosting/scanner/tests/test_bzrsync.py 2011-06-15 13:21:37 +0000
+++ lib/lp/codehosting/scanner/tests/test_bzrsync.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import os
import random
import time
-import unittest
from bzrlib.revision import (
NULL_REVISION,
@@ -775,7 +774,3 @@
# Check that properties are stored in the database.
db_revision = getUtility(IRevisionSet).getByRevisionId('rev1')
self.assertEquals(properties, db_revision.getProperties())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/scanner/tests/test_email.py'
--- lib/lp/codehosting/scanner/tests/test_email.py 2010-10-04 19:50:45 +0000
+++ lib/lp/codehosting/scanner/tests/test_email.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import email
-import unittest
from zope.component import getUtility
from zope.event import notify
@@ -229,7 +228,3 @@
bzrsync = self.makeBzrSync(self.db_branch)
bzrsync.syncBranchAndClose()
self.assertNoPendingEmails()
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/scanner/tests/test_mergedetection.py'
--- lib/lp/codehosting/scanner/tests/test_mergedetection.py 2010-10-26 15:47:24 +0000
+++ lib/lp/codehosting/scanner/tests/test_mergedetection.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import logging
-import unittest
from bzrlib.revision import NULL_REVISION
import transaction
@@ -402,7 +401,3 @@
self.assertFoundRevisionNumber(3, 'rev-3b')
self.assertFoundRevisionNumber(2, 'rev-2-1c')
self.assertFoundRevisionNumber(1, 'rev-1')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/scripts/tests/test_modifiedbranches.py'
--- lib/lp/codehosting/scripts/tests/test_modifiedbranches.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/scripts/tests/test_modifiedbranches.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
from datetime import datetime
import os
-import unittest
import pytz
@@ -188,8 +187,3 @@
self.script.update_locations('foo/bar/who')
expected = set(['foo', 'foo/bar', 'foo/bar/baz', 'foo/bar/who'])
self.assertEqual(expected, self.script.locations)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/codehosting/tests/test_acceptance.py'
--- lib/lp/codehosting/tests/test_acceptance.py 2011-01-31 06:33:01 +0000
+++ lib/lp/codehosting/tests/test_acceptance.py 2011-08-12 12:59:24 +0000
@@ -726,14 +726,3 @@
new_suite = unittest.TestSuite()
multiply_tests(base_suite, scenarios, new_suite)
return new_suite
-
-
-def test_suite():
- base_suite = unittest.makeSuite(AcceptanceTests)
- suite = unittest.TestSuite()
-
- suite.addTest(make_server_tests(base_suite, ['sftp', 'bzr+ssh']))
- suite.addTest(make_server_tests(
- unittest.makeSuite(SmartserverTests), ['bzr+ssh']))
- suite.addTest(make_smoke_tests(unittest.makeSuite(SmokeTest)))
- return suite
=== modified file 'lib/lp/codehosting/tests/test_branchdistro.py'
--- lib/lp/codehosting/tests/test_branchdistro.py 2011-08-03 11:00:11 +0000
+++ lib/lp/codehosting/tests/test_branchdistro.py 2011-08-12 12:59:24 +0000
@@ -15,7 +15,6 @@
STDOUT,
)
import textwrap
-import unittest
from bzrlib.branch import Branch
from bzrlib.bzrdir import BzrDir
@@ -643,7 +642,3 @@
self.assertEqual(
textwrap.dedent(expected), output)
self.assertEqual(1, returncode)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/tests/test_bzrlib.py'
--- lib/lp/codehosting/tests/test_bzrlib.py 2009-09-08 03:32:02 +0000
+++ lib/lp/codehosting/tests/test_bzrlib.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from lp.testing import TestCase
@@ -17,7 +15,3 @@
import bzrlib._dirstate_helpers_pyx
except ImportError:
self.fail("Bzr not built with C extensions.")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/tests/test_bzrutils.py'
--- lib/lp/codehosting/tests/test_bzrutils.py 2011-08-09 15:08:27 +0000
+++ lib/lp/codehosting/tests/test_bzrutils.py 2011-08-12 12:59:24 +0000
@@ -24,7 +24,6 @@
test_server,
TestCase,
TestCaseWithTransport,
- TestLoader,
TestNotApplicable,
)
from bzrlib.tests.per_branch import (
@@ -236,8 +235,3 @@
result.addTests(loader.loadTestsFromTestCase(TestExceptionLoggingHooks))
result.addTests(loader.loadTestsFromTestCase(TestGetVfsFormatClasses))
return result
-
-
-def test_suite():
- loader = TestLoader()
- return loader.loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/tests/test_format_comparison.py'
--- lib/lp/codehosting/tests/test_format_comparison.py 2010-08-20 20:31:18 +0000
+++ lib/lp/codehosting/tests/test_format_comparison.py 2011-08-12 12:59:24 +0000
@@ -78,7 +78,3 @@
identical_formats(
StubBranch(BzrDirFormatA(), RepoFormatA(), BranchFormatA()),
StubBranch(BzrDirFormatA(), RepoFormatA(), BranchFormatB())))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/tests/test_jobs.py'
--- lib/lp/codehosting/tests/test_jobs.py 2010-10-26 15:47:24 +0000
+++ lib/lp/codehosting/tests/test_jobs.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for Job-running facilities."""
-from unittest import TestLoader
-
from canonical.config import config
from canonical.testing.layers import LaunchpadZopelessLayer
from lp.code.enums import (
@@ -48,7 +46,3 @@
existing_diff = StaticDiff.selectOneBy(
from_revision_id='null:', to_revision_id=to_revision_id)
self.assertIsNot(None, existing_diff)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/tests/test_lpserve.py'
--- lib/lp/codehosting/tests/test_lpserve.py 2010-10-07 23:43:40 +0000
+++ lib/lp/codehosting/tests/test_lpserve.py 2011-08-12 12:59:24 +0000
@@ -102,13 +102,3 @@
result = self.finish_lpserve_subprocess(process)
self.assertFinishedCleanly(result)
self.assertIsNot(None, error_utility.getLastOopsReport())
-
-
-def test_suite():
- from bzrlib import tests
- from bzrlib.plugins import lpserve
-
- loader = tests.TestLoader()
- suite = loader.loadTestsFromName(__name__)
- suite = lpserve.load_tests(suite, lpserve, loader)
- return suite
=== modified file 'lib/lp/codehosting/tests/test_rewrite.py'
--- lib/lp/codehosting/tests/test_rewrite.py 2011-04-18 01:37:03 +0000
+++ lib/lp/codehosting/tests/test_rewrite.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import re
import signal
import subprocess
-import unittest
import transaction
from zope.security.proxy import removeSecurityProxy
@@ -275,8 +274,3 @@
# The script produces logging output, but not to stderr.
self.assertEqual('', err)
self.assertEqual(expected_lines, output_lines)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/codehosting/vfs/tests/test_filesystem.py'
--- lib/lp/codehosting/vfs/tests/test_filesystem.py 2011-04-18 23:05:14 +0000
+++ lib/lp/codehosting/vfs/tests/test_filesystem.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import stat
-import unittest
from bzrlib import errors
from bzrlib.bzrdir import BzrDir
@@ -308,7 +307,3 @@
# returned_path is equivalent but not equal to escaped_path.
[returned_path] = list(transport.list_dir('.'))
self.assertEqual(content, transport.get_bytes(returned_path))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/vfs/tests/test_hooks.py'
--- lib/lp/codehosting/vfs/tests/test_hooks.py 2010-03-23 03:30:17 +0000
+++ lib/lp/codehosting/vfs/tests/test_hooks.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from lp.codehosting.vfs.hooks import SetProcTitleHook
from lp.testing import TestCase
@@ -57,7 +55,3 @@
self.assertEqual(
initial_title + " BRANCH:" + branch_url2,
setproctitle_mod.getproctitle())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/vfs/tests/test_transport.py'
--- lib/lp/codehosting/vfs/tests/test_transport.py 2010-09-22 18:32:22 +0000
+++ lib/lp/codehosting/vfs/tests/test_transport.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from bzrlib.tests import per_transport
from bzrlib.transport import (
chroot,
@@ -110,7 +108,3 @@
result = self.defaultTestResult()
super(TestLaunchpadTransportImplementation, self).run(
TestResultWrapper(result))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/codehosting/vfs/tests/test_transport_extensions.py'
--- lib/lp/codehosting/vfs/tests/test_transport_extensions.py 2009-06-25 04:06:00 +0000
+++ lib/lp/codehosting/vfs/tests/test_transport_extensions.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from bzrlib.transport.memory import MemoryTransport
from lp.codehosting.vfs.transport import get_readonly_transport
@@ -30,8 +28,3 @@
readonly_transport = get_readonly_transport(transport)
double_readonly = get_readonly_transport(readonly_transport)
self.assertIs(readonly_transport, double_readonly)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/hardwaredb/tests/test_hwdb_submission_validation.py'
--- lib/lp/hardwaredb/tests/test_hwdb_submission_validation.py 2011-04-06 18:03:34 +0000
+++ lib/lp/hardwaredb/tests/test_hwdb_submission_validation.py 2011-08-12 12:59:24 +0000
@@ -7,10 +7,7 @@
import logging
import os
import re
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from zope.testing.loghandler import Handler
from canonical.config import config
@@ -2818,7 +2815,3 @@
submission_id, result,
'Extra element context in interleave',
'detection of an invalid sub.node of <info> failed')
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/poppy/tests/test_twistedsftp.py'
--- lib/lp/poppy/tests/test_twistedsftp.py 2011-05-09 01:57:28 +0000
+++ lib/lp/poppy/tests/test_twistedsftp.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
import os
import tempfile
-import unittest
from lp.poppy.twistedsftp import SFTPServer
from lp.services.sshserver.sftp import FileIsADirectory
@@ -59,6 +58,3 @@
FileIsADirectory,
"File is a directory: '%s'" % dir_name,
upload_file.writeChunk, 0, "This is a test")
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_branding.py'
--- lib/lp/registry/browser/tests/test_branding.py 2010-07-10 00:19:01 +0000
+++ lib/lp/registry/browser/tests/test_branding.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.registry.browser.branding import BrandingChangeView
@@ -27,7 +25,3 @@
label = 'Change the images used to represent Cow in Launchpad'
self.assertEqual(label, self.view.label)
self.assertEqual('Change branding', self.view.page_title)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_breadcrumbs.py'
--- lib/lp/registry/browser/tests/test_breadcrumbs.py 2011-08-03 11:00:11 +0000
+++ lib/lp/registry/browser/tests/test_breadcrumbs.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from canonical.launchpad.webapp.publisher import canonical_url
@@ -150,7 +148,3 @@
'http://launchpad.dev/+nameblacklist/1/+edit'),
]
self.assertBreadcrumbs(expected, blacklist, view_name='+edit')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_edit_permissions.py'
--- lib/lp/registry/browser/tests/test_edit_permissions.py 2011-05-27 21:12:25 +0000
+++ lib/lp/registry/browser/tests/test_edit_permissions.py 2011-08-12 12:59:24 +0000
@@ -5,9 +5,6 @@
__metaclass__ = type
-
-import unittest
-
from zope.component import getUtility
from canonical.launchpad.ftests import (
@@ -121,13 +118,3 @@
login_person(self.supervisor_member)
view = create_initialized_view(self.target, '+edit')
self.assertTrue(check_permission('launchpad.BugSupervisor', view))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
-
-
-if __name__ == '__main__':
- unittest.main()
=== modified file 'lib/lp/registry/browser/tests/test_gpgkey.py'
--- lib/lp/registry/browser/tests/test_gpgkey.py 2010-03-03 16:26:54 +0000
+++ lib/lp/registry/browser/tests/test_gpgkey.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp import canonical_url
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import TestCaseWithFactory
@@ -24,7 +22,3 @@
'%s/+gpg-keys/%s' % (
canonical_url(person, rootsite='api'), gpgkey.keyid),
canonical_url(gpgkey))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_packaging.py'
--- lib/lp/registry/browser/tests/test_packaging.py 2011-05-27 21:12:25 +0000
+++ lib/lp/registry/browser/tests/test_packaging.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from zope.component import getUtility
from canonical.launchpad.ftests import (
@@ -225,7 +223,3 @@
self.hoary, name='+packaging', principal=self.observer)
self.assertCacheHit(
'<table id="packagings"', 'public, 30 minute', view.render())
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_person.py'
--- lib/lp/registry/browser/tests/test_person.py 2010-08-20 20:31:18 +0000
+++ lib/lp/registry/browser/tests/test_person.py 2011-08-12 12:59:24 +0000
@@ -5,9 +5,7 @@
__metaclass__ = type
-
from textwrap import dedent
-import unittest
from canonical.config import config
from canonical.launchpad.ftests import login_person
@@ -50,13 +48,3 @@
'''))
self.assertEquals(
'http://prod.launchpad.dev/~eris', self.view.openid_identity_url)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
-
-
-if __name__ == '__main__':
- unittest.main()
=== modified file 'lib/lp/registry/browser/tests/test_person_webservice.py'
--- lib/lp/registry/browser/tests/test_person_webservice.py 2010-12-17 23:59:00 +0000
+++ lib/lp/registry/browser/tests/test_person_webservice.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.security.management import endInteraction
from zope.security.proxy import removeSecurityProxy
@@ -76,7 +74,3 @@
self.assertEquals(
rendered_comment,
'<a href="/~test-person" class="sprite person">Test Person</a>')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/browser/tests/test_subscription_links.py'
--- lib/lp/registry/browser/tests/test_subscription_links.py 2011-07-01 11:27:27 +0000
+++ lib/lp/registry/browser/tests/test_subscription_links.py 2011-08-12 12:59:24 +0000
@@ -665,8 +665,3 @@
else:
return super(CustomTestLoader, self).getTestCaseNames(
testCaseClass)
-
-
-def test_suite():
- """Return the `IStructuralSubscriptionTarget` TestSuite."""
- return CustomTestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_commercialprojects_vocabularies.py'
--- lib/lp/registry/tests/test_commercialprojects_vocabularies.py 2011-06-28 15:04:29 +0000
+++ lib/lp/registry/tests/test_commercialprojects_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -5,10 +5,7 @@
__metaclass__ = type
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -122,6 +119,3 @@
self.assertEqual(0, len(results),
"Expected %d results but got %d." %
(0, len(results)))
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_distributionmirror.py'
--- lib/lp/registry/tests/test_distributionmirror.py 2011-05-27 21:12:25 +0000
+++ lib/lp/registry/tests/test_distributionmirror.py 2011-08-12 12:59:24 +0000
@@ -268,8 +268,3 @@
france, MirrorContent.RELEASE)
self.failUnless(len(mirrors) > 1, "Not enough mirrors")
self.failUnlessEqual(main_mirror, mirrors[-1])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/registry/tests/test_distributionsourcepackage.py'
--- lib/lp/registry/tests/test_distributionsourcepackage.py 2011-08-03 11:00:11 +0000
+++ lib/lp/registry/tests/test_distributionsourcepackage.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
import transaction
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -163,7 +161,3 @@
archive.name for archive in related_archives]
self.assertEqual(related_archive_names, ['gedit-beta'])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_karmacache_updater.py'
--- lib/lp/registry/tests/test_karmacache_updater.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_karmacache_updater.py 2011-08-12 12:59:24 +0000
@@ -103,8 +103,3 @@
# And finally, ensure that No Priv got some new KarmaCache entries.
self.failUnless(self._getCacheEntriesByPerson(nopriv).count() > 0)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/registry/tests/test_milestone_vocabularies.py'
--- lib/lp/registry/tests/test_milestone_vocabularies.py 2011-03-23 16:28:51 +0000
+++ lib/lp/registry/tests/test_milestone_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -5,10 +5,7 @@
__metaclass__ = type
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from zope.component import getUtility
@@ -163,7 +160,3 @@
self.assertEqual(
[term.title for term in vocabulary],
[u'Debian 3.1', u'Debian 3.1-rc1', u'Mozilla Firefox 1.0'])
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_mlists.py'
--- lib/lp/registry/tests/test_mlists.py 2011-07-26 21:41:19 +0000
+++ lib/lp/registry/tests/test_mlists.py 2011-08-12 12:59:24 +0000
@@ -501,7 +501,3 @@
u'anne.person@xxxxxxxxxxx', u'bperson@xxxxxxxxxxx',
u'cris.person@xxxxxxxxxxx', u'dperson@xxxxxxxxxxx',
u'elly.person@xxxxxxxxxxx')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_personproduct.py'
--- lib/lp/registry/tests/test_personproduct.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_personproduct.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.publisher import canonical_url
from canonical.launchpad.webapp.url import urlappend
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -28,8 +26,3 @@
urlappend(canonical_url(person),
product.name),
canonical_url(pp))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/registry/tests/test_personset.py'
--- lib/lp/registry/tests/test_personset.py 2011-03-29 03:13:04 +0000
+++ lib/lp/registry/tests/test_personset.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
import transaction
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -252,7 +250,3 @@
u'other-openid-identifier' in [
identifier.identifier for identifier in removeSecurityProxy(
person.account).openid_identifiers])
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_pillar.py'
--- lib/lp/registry/tests/test_pillar.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_pillar.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Unit tests for methods of PillarName and PillarNameSet."""
-import unittest
-
from zope.component import getUtility
from canonical.launchpad.ftests import login
@@ -29,7 +27,3 @@
result_names = [
pillar.name for pillar in pillar_set.search('lz', limit=5)]
self.assertEquals(result_names, [u'launchzap', u'lz-bar', u'lz-foo'])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_pillarname_triggers.py'
--- lib/lp/registry/tests/test_pillarname_triggers.py 2011-03-10 22:36:25 +0000
+++ lib/lp/registry/tests/test_pillarname_triggers.py 2011-08-12 12:59:24 +0000
@@ -184,7 +184,3 @@
cur.execute("DELETE FROM Project WHERE name='whatever2'")
cur.execute("SELECT COUNT(*) FROM PillarName WHERE name='whatever2'")
self.failUnlessEqual(cur.fetchone()[0], 0)
-
-
-def test_suite():
- return unittest.makeSuite(PillarNameTriggersTestCase)
=== modified file 'lib/lp/registry/tests/test_prf_filter.py'
--- lib/lp/registry/tests/test_prf_filter.py 2011-06-09 10:50:25 +0000
+++ lib/lp/registry/tests/test_prf_filter.py 2011-08-12 12:59:24 +0000
@@ -110,7 +110,3 @@
self.assertTrue(f.isPossibleParent("file:///subdir/1.42"))
self.assertTrue(f.isPossibleParent("file:///subdir/1.abc/"))
self.assertFalse(f.isPossibleParent("file:///subdir/2.0"))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_prf_finder.py'
--- lib/lp/registry/tests/test_prf_finder.py 2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_prf_finder.py 2011-08-12 12:59:24 +0000
@@ -415,7 +415,3 @@
self.assertEqual(version, '0.2-rm-zomb-pre1')
version = extract_version('warzone2100-2.0.5_rc1.tar.bz2')
self.assertEqual(version, '2.0.5-rc1')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_prf_hose.py'
--- lib/lp/registry/tests/test_prf_hose.py 2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_prf_hose.py 2011-08-12 12:59:24 +0000
@@ -189,7 +189,3 @@
self.assertEqual(sorted(unmatched),
['/foo/1.0/foo-1.0.tar.gz',
'/foo/1.0/source/foo-2.0.tar.gz'])
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_prf_log.py'
--- lib/lp/registry/tests/test_prf_log.py 2009-06-30 21:06:27 +0000
+++ lib/lp/registry/tests/test_prf_log.py 2011-08-12 12:59:24 +0000
@@ -42,7 +42,3 @@
parent1 = getLogger("foo")
parent2 = getLogger("foo.bar")
self.assertEquals(get_logger("test", parent2).name, "foo.bar.test")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_prf_walker.py'
--- lib/lp/registry/tests/test_prf_walker.py 2011-06-09 10:50:25 +0000
+++ lib/lp/registry/tests/test_prf_walker.py 2011-08-12 12:59:24 +0000
@@ -5,7 +5,6 @@
import logging
import StringIO
-import unittest
import urlparse
@@ -506,7 +505,3 @@
"file:///subdir/file")
self.assertEquals(combine_url("file:///base", "/subdir", "file"),
"file:///subdir/file")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_productseries_vocabularies.py'
--- lib/lp/registry/tests/test_productseries_vocabularies.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_productseries_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from operator import attrgetter
-from unittest import TestLoader
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.registry.vocabularies import ProductSeriesVocabulary
@@ -75,7 +74,3 @@
self.assertRaises(
LookupError,
self.vocabulary.getTermByToken, 'does/notexist')
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_projectgroup.py'
--- lib/lp/registry/tests/test_projectgroup.py 2010-12-14 15:20:24 +0000
+++ lib/lp/registry/tests/test_projectgroup.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lazr.restfulclient.errors import ClientError
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
@@ -157,7 +155,3 @@
self.assertIn(
'This project cannot be deactivated since it is linked to source '
'packages.', e.content)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_ro_user.py'
--- lib/lp/registry/tests/test_ro_user.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_ro_user.py 2011-08-12 12:59:24 +0000
@@ -50,9 +50,3 @@
psycopg2.Error, cur.execute, "DELETE FROM WikiName"
)
cur.execute("ROLLBACK TO SAVEPOINT attempt")
-
-
-def test_suite():
- """Create the test suite."""
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/registry/tests/test_samplekarma.py'
--- lib/lp/registry/tests/test_samplekarma.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_samplekarma.py 2011-08-12 12:59:24 +0000
@@ -23,7 +23,3 @@
dud_rows = cur.fetchone()[0]
self.failUnlessEqual(
dud_rows, 0, 'Karma time bombs added to sampledata')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_service_usage.py'
--- lib/lp/registry/tests/test_service_usage.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_service_usage.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.app.enums import ServiceUsage
@@ -275,7 +273,3 @@
# be current, the series pillar must be marked as using
# using translations.
self.series_pillar.translations_usage = ServiceUsage.LAUNCHPAD
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_sourcepackage.py'
--- lib/lp/registry/tests/test_sourcepackage.py 2011-08-03 11:00:11 +0000
+++ lib/lp/registry/tests/test_sourcepackage.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from lazr.lifecycle.event import (
ObjectCreatedEvent,
ObjectDeletedEvent,
@@ -678,7 +676,3 @@
self.assertEqual(
['trunk', 'current'], options,
"The obsolete series must NOT be in the vocabulary.")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_suitesourcepackage.py'
--- lib/lp/registry/tests/test_suitesourcepackage.py 2011-08-03 11:00:11 +0000
+++ lib/lp/registry/tests/test_suitesourcepackage.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.model.suitesourcepackage import SuiteSourcePackage
@@ -36,48 +34,3 @@
ssp = self.factory.makeSuiteSourcePackage()
package = ssp.distroseries.getSourcePackage(ssp.sourcepackagename)
self.assertEqual(package, ssp.sourcepackage)
-
- def test_suite(self):
- # The `suite` property of a `SuiteSourcePackage` is a string of the
- # distro series name followed by the pocket suffix.
- ssp = self.factory.makeSuiteSourcePackage()
- self.assertEqual(ssp.distroseries.getSuite(ssp.pocket), ssp.suite)
-
- def test_distribution(self):
- # The `distribution` property of a `SuiteSourcePackage` is the
- # distribution that the object's distroseries is associated with.
- ssp = self.factory.makeSuiteSourcePackage()
- self.assertEqual(ssp.distroseries.distribution, ssp.distribution)
-
- def test_path(self):
- # The `path` property of a `SuiteSourcePackage` is a string that has
- # the distribution name followed by the suite followed by the source
- # package name, separated by slashes.
- ssp = self.factory.makeSuiteSourcePackage()
- self.assertEqual(
- '%s/%s/%s' % (
- ssp.distribution.name, ssp.suite, ssp.sourcepackagename.name),
- ssp.path)
-
- def test_repr(self):
- # The repr of a `SuiteSourcePackage` includes the path and clearly
- # refers to the type of the object.
- ssp = self.factory.makeSuiteSourcePackage()
- self.assertEqual('<SuiteSourcePackage %s>' % ssp.path, repr(ssp))
-
- def test_equality(self):
- ssp1 = self.factory.makeSuiteSourcePackage()
- ssp2 = SuiteSourcePackage(
- ssp1.distroseries, ssp1.pocket, ssp1.sourcepackagename)
- self.assertEqual(ssp1, ssp2)
-
- def test_displayname(self):
- # A suite source package has a display name.
- ssp = self.factory.makeSuiteSourcePackage()
- self.assertEqual(
- '%s in %s' % (ssp.sourcepackagename.name, ssp.suite),
- ssp.displayname)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_teammembership_webservice.py'
--- lib/lp/registry/tests/test_teammembership_webservice.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_teammembership_webservice.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from canonical.testing.layers import DatabaseFunctionalLayer
@@ -62,7 +60,3 @@
team_membership.setStatus,
status='Proposed')
self.assertEqual(400, api_exception.response.status)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_update_stats.py'
--- lib/lp/registry/tests/test_update_stats.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_update_stats.py 2011-08-12 12:59:24 +0000
@@ -362,9 +362,3 @@
self.failUnlessEqual(
None, english_dsl, 'The English DistroSeriesLangauge must '
'not exist.')
-
-
-def test_suite():
- """Return this module's test suite."""
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/registry/tests/test_user_vocabularies.py'
--- lib/lp/registry/tests/test_user_vocabularies.py 2010-10-04 19:50:45 +0000
+++ lib/lp/registry/tests/test_user_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from zope.component import getUtility
from zope.schema.vocabulary import getVocabularyRegistry
@@ -144,7 +142,3 @@
# AllUserTeamsPariticipationVocabulary is empty for anoymous users.
login(ANONYMOUS)
self.assertEqual([], self._vocabTermValues())
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/registry/tests/test_xmlrpc.py'
--- lib/lp/registry/tests/test_xmlrpc.py 2011-02-17 16:54:08 +0000
+++ lib/lp/registry/tests/test_xmlrpc.py 2011-08-12 12:59:24 +0000
@@ -5,7 +5,6 @@
__metaclass__ = type
-import unittest
import xmlrpclib
from zope.component import getUtility
@@ -124,7 +123,3 @@
self.assertEqual(404, e.errcode)
self.assertTrue(protocol_error_raised)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/scripts/utilities/tests/test_pageperformancereport.py'
--- lib/lp/scripts/utilities/tests/test_pageperformancereport.py 2011-05-02 19:52:35 +0000
+++ lib/lp/scripts/utilities/tests/test_pageperformancereport.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from lp.scripts.utilities.pageperformancereport import (
Category,
Histogram,
@@ -483,7 +481,3 @@
hist3 = Histogram.from_bins_data([[0, 5], [1, 4], [2, 7], [3, 6]])
self.assertEquals(hist3, hist1 + hist2)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/apachelogparser/tests/test_apachelogparser.py'
--- lib/lp/services/apachelogparser/tests/test_apachelogparser.py 2011-01-20 00:01:32 +0000
+++ lib/lp/services/apachelogparser/tests/test_apachelogparser.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
from StringIO import StringIO
import tempfile
from operator import itemgetter
-import unittest
from zope.component import getUtility
@@ -508,7 +507,3 @@
self.assertIs(entry, entry2)
self.assertIsNot(None, entry2)
self.assertEqual(entry2.bytes_read, len(first_line))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/database/tests/test_storm.py'
--- lib/lp/services/database/tests/test_storm.py 2009-09-08 03:32:02 +0000
+++ lib/lp/services/database/tests/test_storm.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
import storm
from lp.testing import TestCase
@@ -18,7 +16,3 @@
self.assert_(
storm.has_cextensions,
'Storm not running with C extensions')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/database/tests/test_transaction_decorators.py'
--- lib/lp/services/database/tests/test_transaction_decorators.py 2010-10-04 19:50:45 +0000
+++ lib/lp/services/database/tests/test_transaction_decorators.py 2011-08-12 12:59:24 +0000
@@ -86,7 +86,3 @@
"Store wasn't reset properly.")
finally:
transaction.manager.unregisterSynch(aborter)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/fields/tests/test_tag_fields.py'
--- lib/lp/services/fields/tests/test_tag_fields.py 2010-10-04 19:50:45 +0000
+++ lib/lp/services/fields/tests/test_tag_fields.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
"""Tests for tag related fields."""
-import unittest
-
from zope.schema.interfaces import ConstraintNotSatisfied
from canonical.testing.layers import LaunchpadFunctionalLayer
@@ -94,7 +92,3 @@
self.assertRaises(
ConstraintNotSatisfied,
self.field.validate, u'sn*t-allowed')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/geoip/tests/test_request_country.py'
--- lib/lp/services/geoip/tests/test_request_country.py 2010-10-25 05:33:20 +0000
+++ lib/lp/services/geoip/tests/test_request_country.py 2011-08-12 12:59:24 +0000
@@ -56,7 +56,3 @@
country = request_country({'REMOTE_ADDR': '127.0.0.1'})
self.failUnless(country is None)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/mail/tests/test_basemailer.py'
--- lib/lp/services/mail/tests/test_basemailer.py 2011-03-04 01:04:06 +0000
+++ lib/lp/services/mail/tests/test_basemailer.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
from smtplib import SMTPException
-import unittest
from canonical.testing.layers import LaunchpadZopelessLayer
from lp.services.mail.basemailer import BaseMailer
@@ -185,9 +184,3 @@
self.assertEqual(
'Excessively large attachments removed.',
bad_parts[1].get_payload(decode=True))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTests(unittest.TestLoader().loadTestsFromName(__name__))
- return suite
=== modified file 'lib/lp/services/mail/tests/test_dkim.py'
--- lib/lp/services/mail/tests/test_dkim.py 2011-05-08 09:53:30 +0000
+++ lib/lp/services/mail/tests/test_dkim.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
import logging
from StringIO import StringIO
-import unittest
import dkim
import dns.resolver
@@ -262,7 +261,3 @@
self.assertEqual(principal.person.preferredemail.email,
'foo.bar@xxxxxxxxxxxxx')
self.assertDkimLogContains('body hash mismatch')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/mail/tests/test_mailbox.py'
--- lib/lp/services/mail/tests/test_mailbox.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/mail/tests/test_mailbox.py 2011-08-12 12:59:24 +0000
@@ -8,7 +8,6 @@
import os
from shutil import rmtree
import tempfile
-from unittest import TestLoader
from canonical.launchpad.interfaces.mailbox import IMailBox
from canonical.launchpad.webapp.testing import verifyObject
@@ -67,7 +66,3 @@
for id, content in box.items():
box.delete(id)
self.assertEqual(0, len(list(box.items())))
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/mail/tests/test_signedmessage.py'
--- lib/lp/services/mail/tests/test_signedmessage.py 2010-10-15 19:29:58 +0000
+++ lib/lp/services/mail/tests/test_signedmessage.py 2011-08-12 12:59:24 +0000
@@ -13,7 +13,6 @@
make_msgid,
)
from textwrap import dedent
-import unittest
import gpgme
from zope.component import getUtility
@@ -166,7 +165,3 @@
self.assertEqual(sender, principle.person)
self.assertFalse(
IWeaklyAuthenticatedPrincipal.providedBy(principle))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/scripts/tests/test_cronscript_enabled.py'
--- lib/lp/services/scripts/tests/test_cronscript_enabled.py 2010-12-20 22:03:26 +0000
+++ lib/lp/services/scripts/tests/test_cronscript_enabled.py 2011-08-12 12:59:24 +0000
@@ -12,7 +12,6 @@
import sys
from tempfile import NamedTemporaryFile
from textwrap import dedent
-import unittest
from lp.services.log.logger import BufferLogger
from lp.services.scripts.base import cronscript_enabled
@@ -137,7 +136,3 @@
'-qqqqq', 'disabled',
]
self.assertEqual(0, subprocess.call(cmd))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/sshserver/tests/test_accesslog.py'
--- lib/lp/services/sshserver/tests/test_accesslog.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/sshserver/tests/test_accesslog.py 2011-08-12 12:59:24 +0000
@@ -11,7 +11,6 @@
from StringIO import StringIO
import sys
import tempfile
-import unittest
from bzrlib.tests import TestCase as BzrTestCase
import zope.component.event
@@ -145,7 +144,3 @@
[handler] = access_log.handlers
self.assertIsInstance(handler, WatchedFileHandler)
self.assertEqual(access_log_path, handler.baseFilename)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/sshserver/tests/test_events.py'
--- lib/lp/services/sshserver/tests/test_events.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/sshserver/tests/test_events.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import logging
-import unittest
from zope.component import (
adapter,
@@ -90,8 +89,3 @@
level = logging.INFO
self.assertEventLogs(
(logging.INFO, 'foo happened.'), SomeEvent(something='foo'))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/services/sshserver/tests/test_session.py'
--- lib/lp/services/sshserver/tests/test_session.py 2010-07-18 19:08:36 +0000
+++ lib/lp/services/sshserver/tests/test_session.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from twisted.conch.interfaces import ISession
from twisted.conch.ssh import connection
@@ -99,7 +97,3 @@
def test_eofReceivedDoesNothingWhenNoCommand(self):
# When no process has been created, 'eofReceived' is a no-op.
self.assertEqual(None, self.session.eofReceived())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/tests/test_mime.py'
--- lib/lp/services/tests/test_mime.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/tests/test_mime.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import mimetypes
-import unittest
from lp.services.mime import customizeMimetypes
from lp.testing import TestCase
@@ -40,7 +39,3 @@
(application, encoding) = mimetypes.guess_type(filename)
self.assertEqual('application/x-tar', application)
self.assertEqual('bzip2', encoding)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/tests/test_osutils.py'
--- lib/lp/services/tests/test_osutils.py 2011-02-25 17:12:07 +0000
+++ lib/lp/services/tests/test_osutils.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
import os
import socket
import tempfile
-import unittest
from lp.services.osutils import (
ensure_directory_exists,
@@ -191,7 +190,3 @@
IOError, until_no_eintr, self.MAX_RETRIES, function)
self.assertEqual(errno.EINTR, error.errno)
self.assertEqual(self.MAX_RETRIES, len(calls))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/tests/test_vocabularies.py'
--- lib/lp/services/tests/test_vocabularies.py 2010-01-15 23:40:30 +0000
+++ lib/lp/services/tests/test_vocabularies.py 2011-08-12 12:59:24 +0000
@@ -6,8 +6,6 @@
__metaclass__ = type
__all__ = []
-import unittest
-
from zope.component import getUtilitiesFor
from zope.proxy import isProxy
from zope.schema.interfaces import IVocabularyFactory
@@ -31,7 +29,3 @@
raise AssertionError(
'%s.%s vocabulary is not wrapped in a security proxy.' % (
vocab.__module__, name))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/services/twistedsupport/tests/test_task.py'
--- lib/lp/services/twistedsupport/tests/test_task.py 2010-08-20 20:31:18 +0000
+++ lib/lp/services/twistedsupport/tests/test_task.py 2011-08-12 12:59:24 +0000
@@ -6,8 +6,6 @@
__metaclass__ = type
-import unittest
-
from twisted.internet.defer import (
Deferred,
succeed,
@@ -667,7 +665,3 @@
d.callback(None)
self.assertEqual([], task_log)
self.assertEqual([('start', consumer)], source_log)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/soyuz/browser/tests/test_archive_webservice.py'
--- lib/lp/soyuz/browser/tests/test_archive_webservice.py 2011-07-27 05:48:20 +0000
+++ lib/lp/soyuz/browser/tests/test_archive_webservice.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lazr.restfulclient.errors import (
BadRequest,
NotFound,
@@ -375,6 +373,3 @@
job_source = getUtility(IPlainPackageCopyJobSource)
copy_job = job_source.getActiveJobs(target_archive).one()
self.assertEqual(target_archive, copy_job.target_archive)
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/soyuz/scripts/tests/test_removepackage.py'
--- lib/lp/soyuz/scripts/tests/test_removepackage.py 2010-12-20 03:21:03 +0000
+++ lib/lp/soyuz/scripts/tests/test_removepackage.py 2011-08-12 12:59:24 +0000
@@ -439,7 +439,3 @@
remover = self.getRemover()
remover.args = []
self.assertRaises(SoyuzScriptError, remover.mainTask)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/soyuz/scripts/tests/test_soyuzscript.py'
--- lib/lp/soyuz/scripts/tests/test_soyuzscript.py 2010-12-23 00:38:29 +0000
+++ lib/lp/soyuz/scripts/tests/test_soyuzscript.py 2011-08-12 12:59:24 +0000
@@ -231,7 +231,3 @@
# asks the user for confirmation via raw_input.
soyuz.options.dryrun = True
self.assertFalse(soyuz.finishProcedure())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/soyuz/scripts/tests/test_sync_source.py'
--- lib/lp/soyuz/scripts/tests/test_sync_source.py 2011-05-20 07:43:58 +0000
+++ lib/lp/soyuz/scripts/tests/test_sync_source.py 2011-08-12 12:59:24 +0000
@@ -15,9 +15,6 @@
import subprocess
import sys
import tempfile
-from unittest import (
- TestLoader,
- )
from zope.component import getUtility
@@ -540,6 +537,3 @@
'Urgency',
'Version',
], read_changes.keys())
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/soyuz/tests/test_archivejob.py'
--- lib/lp/soyuz/tests/test_archivejob.py 2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/tests/test_archivejob.py 2011-08-12 12:59:24 +0000
@@ -1,8 +1,6 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-import unittest
-
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.soyuz.enums import ArchiveJobType
from lp.soyuz.model.archivejob import (
@@ -47,7 +45,3 @@
archive = self.factory.makeArchive()
self.assertRaises(
AttributeError, ArchiveJobDerived.create, archive)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/testing/tests/test_fakemethod.py'
--- lib/lp/testing/tests/test_fakemethod.py 2010-08-20 20:31:18 +0000
+++ lib/lp/testing/tests/test_fakemethod.py 2011-08-12 12:59:24 +0000
@@ -1,10 +1,7 @@
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from lp.testing.fakemethod import FakeMethod
@@ -82,7 +79,3 @@
func(1)
func(2, kwarg=3)
self.assertEqual(3, func.call_count)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/testing/tests/test_login.py'
--- lib/lp/testing/tests/test_login.py 2011-05-27 21:12:25 +0000
+++ lib/lp/testing/tests/test_login.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from zope.app.security.interfaces import IUnauthenticatedPrincipal
from zope.component import getUtility
@@ -293,7 +291,3 @@
# anonymous_logged_in is a context logged in as anonymous.
with anonymous_logged_in():
self.assertLoggedIn(ANONYMOUS)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/testing/tests/test_testcase.py'
--- lib/lp/testing/tests/test_testcase.py 2010-09-04 20:18:39 +0000
+++ lib/lp/testing/tests/test_testcase.py 2011-08-12 12:59:24 +0000
@@ -7,7 +7,6 @@
from StringIO import StringIO
import sys
-import unittest
from storm.store import Store
from zope.component import getUtility
@@ -100,8 +99,3 @@
self.assertEqual(
oops.get_chunks(),
from_details.get_chunks())
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/testing/tests/test_zope_test_in_subprocess.py'
--- lib/lp/testing/tests/test_zope_test_in_subprocess.py 2010-03-15 11:47:43 +0000
+++ lib/lp/testing/tests/test_zope_test_in_subprocess.py 2011-08-12 12:59:24 +0000
@@ -125,7 +125,3 @@
self.failUnlessEqual(
self.pid_in_setUp, self.pid_in_tearDown,
"tearDown() not run in same process as setUp().")
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/browser/tests/test_baseexportview.py'
--- lib/lp/translations/browser/tests/test_baseexportview.py 2011-07-01 19:17:03 +0000
+++ lib/lp/translations/browser/tests/test_baseexportview.py 2011-08-12 12:59:24 +0000
@@ -4,7 +4,6 @@
__metaclass__ = type
from datetime import timedelta
-import unittest
import transaction
@@ -226,13 +225,3 @@
status = "%s %s" % (size, backlog)
self.assertEqual(
status.strip(), self.view.export_queue_status.strip())
-
-
-def test_suite():
- suite = unittest.TestSuite()
- loader = unittest.TestLoader()
- suite.addTest(loader.loadTestsFromTestCase(TestProductSeries))
- suite.addTest(loader.loadTestsFromTestCase(TestSourcePackage))
- suite.addTest(loader.loadTestsFromTestCase(
- TestPOExportQueueStatusDescriptions))
- return suite
=== modified file 'lib/lp/translations/browser/tests/test_persontranslationview.py'
--- lib/lp/translations/browser/tests/test_persontranslationview.py 2011-05-19 12:27:57 +0000
+++ lib/lp/translations/browser/tests/test_persontranslationview.py 2011-08-12 12:59:24 +0000
@@ -3,7 +3,6 @@
__metaclass__ = type
-from unittest import TestLoader
import urllib
from zope.security.proxy import removeSecurityProxy
@@ -423,7 +422,3 @@
# languages.
self.view.context.removeLanguage(self.language)
self.assertTrue(self.view.requires_preferred_languages)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/browser/tests/test_product_view.py'
--- lib/lp/translations/browser/tests/test_product_view.py 2010-10-07 15:14:54 +0000
+++ lib/lp/translations/browser/tests/test_product_view.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
from canonical.testing.layers import (
DatabaseFunctionalLayer,
@@ -106,6 +104,3 @@
login_person(product.owner)
view = create_view(product, '+translations', layer=TranslationsLayer)
self.assertEqual(True, view.can_configure_translations())
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/browser/tests/test_translationlinksaggregator.py'
--- lib/lp/translations/browser/tests/test_translationlinksaggregator.py 2010-10-05 00:08:16 +0000
+++ lib/lp/translations/browser/tests/test_translationlinksaggregator.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from zope.security.proxy import removeSecurityProxy
from canonical.launchpad.webapp import canonical_url
@@ -264,7 +262,3 @@
expected = [(package, canonical_url(package), pofiles)]
self.assertEqual(expected, descriptions)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/scripts/tests/test_validate_translations_file.py'
--- lib/lp/translations/scripts/tests/test_validate_translations_file.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/scripts/tests/test_validate_translations_file.py 2011-08-12 12:59:24 +0000
@@ -8,10 +8,7 @@
import logging
import os.path
from textwrap import dedent
-from unittest import (
- TestCase,
- TestLoader,
- )
+from unittest import TestCase
from canonical.launchpad.ftests.script import run_script
import lp.translations
@@ -129,7 +126,3 @@
script = 'scripts/rosetta/validate-translations-file.py'
result, out, err = run_script(script, [test_input])
self.assertEqual(0, result)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_pottery_detect_intltool.py'
--- lib/lp/translations/tests/test_pottery_detect_intltool.py 2010-10-26 15:47:24 +0000
+++ lib/lp/translations/tests/test_pottery_detect_intltool.py 2011-08-12 12:59:24 +0000
@@ -5,7 +5,6 @@
from StringIO import StringIO
import tarfile
from textwrap import dedent
-import unittest
from bzrlib.bzrdir import BzrDir
@@ -543,9 +542,3 @@
# A quote that's only on one end doesn't get stripped.
configfile = self._makeConfigFile('')
self.assertEqual('"foo', configfile._stripQuotes('"foo'))
-
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/translations/tests/test_productserieslanguage.py'
--- lib/lp/translations/tests/test_productserieslanguage.py 2010-10-04 19:50:45 +0000
+++ lib/lp/translations/tests/test_productserieslanguage.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from zope.component import getUtility
from zope.interface.verify import verifyObject
from zope.security.proxy import removeSecurityProxy
@@ -257,7 +255,3 @@
# And all the counts are zero.
self.assertPSLStatistics(psl, (3, 0, 0, 0, 0, 0,
None))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_shared_potemplate.py'
--- lib/lp/translations/tests/test_shared_potemplate.py 2011-05-27 21:12:25 +0000
+++ lib/lp/translations/tests/test_shared_potemplate.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from storm.exceptions import DataError
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
@@ -681,7 +679,3 @@
singular_text=trunk_potmsgset.singular_text,
plural_text=trunk_potmsgset.plural_text)
self.assertEqual(trunk_potmsgset, hoary_potmsgset)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_translationbuildapprover.py'
--- lib/lp/translations/tests/test_translationbuildapprover.py 2010-10-29 05:58:51 +0000
+++ lib/lp/translations/tests/test_translationbuildapprover.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
import transaction
from zope.component import getUtility
@@ -251,7 +249,3 @@
self.assertEqual(RosettaImportStatus.APPROVED, entries[0].status)
self.assertEqual(filenames[0], domain1_pot.path)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_translationgroup.py'
--- lib/lp/translations/tests/test_translationgroup.py 2011-04-07 12:23:13 +0000
+++ lib/lp/translations/tests/test_translationgroup.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from lazr.restfulclient.errors import Unauthorized
import transaction
from zope.component import getUtility
@@ -94,7 +92,3 @@
self.assertContentEqual(
[group.name for group in translation_group_set],
[group.name for group in self.service.translation_groups])
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_translationmerger.py'
--- lib/lp/translations/tests/test_translationmerger.py 2011-04-11 16:00:53 +0000
+++ lib/lp/translations/tests/test_translationmerger.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
from datetime import timedelta
import gc
from logging import ERROR
-from unittest import TestLoader
import transaction
from zope.component import getUtility
@@ -872,7 +871,3 @@
self.factory.makePOTemplate(sourcepackage=packaging.sourcepackage)
self.assertContentEqual(
[], TranslationMerger.findMergeablePackagings())
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_translations_to_review.py'
--- lib/lp/translations/tests/test_translations_to_review.py 2011-08-03 11:00:11 +0000
+++ lib/lp/translations/tests/test_translations_to_review.py 2011-08-12 12:59:24 +0000
@@ -9,7 +9,6 @@
datetime,
timedelta,
)
-from unittest import TestLoader
from pytz import timezone
import transaction
@@ -250,7 +249,3 @@
# Translations without unreviewed suggestions are ignored.
other_pofile = self._makeOtherPOFile(with_unreviewed=False)
self.assertFalse(other_pofile in self._suggestReviewables())
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildjob.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2011-07-18 20:46:27 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-from unittest import TestLoader
-
from storm.store import Store
from zope.component import getUtility
from zope.event import notify
@@ -299,7 +297,3 @@
specific_job = self.jobsource.create(branch, testing=True)
naked_job = removeSecurityProxy(specific_job)
self.assertEquals(naked_job._constructed_build, specific_job.build)
-
-
-def test_suite():
- return TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_gettext_po_importer.py'
--- lib/lp/translations/utilities/tests/test_gettext_po_importer.py 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/utilities/tests/test_gettext_po_importer.py 2011-08-12 12:59:24 +0000
@@ -93,10 +93,3 @@
self.failUnless(
format == TranslationFileFormat.PO,
'GettextPOImporter format expected PO but got %s' % format.name)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(GettextPOImporterTestCase))
- return suite
-
=== modified file 'lib/lp/translations/utilities/tests/test_gettext_pochanged_exporter.py'
--- lib/lp/translations/utilities/tests/test_gettext_pochanged_exporter.py 2010-10-04 19:50:45 +0000
+++ lib/lp/translations/utilities/tests/test_gettext_pochanged_exporter.py 2011-08-12 12:59:24 +0000
@@ -46,9 +46,3 @@
"Expected GettextPOChangedExporter to support no source formats "
"but got %r instead." % (
self.translation_exporter.supported_source_formats))
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(GettextPOChangedExporterTestCase))
- return suite
=== modified file 'lib/lp/translations/utilities/tests/test_kde_po_importer.py'
--- lib/lp/translations/utilities/tests/test_kde_po_importer.py 2010-12-02 16:13:51 +0000
+++ lib/lp/translations/utilities/tests/test_kde_po_importer.py 2011-08-12 12:59:24 +0000
@@ -178,10 +178,3 @@
(singular == u'Message' and context == u'Context' and
translations[0] == u'Contextual translation'),
"KdePOImporter didn't import translated KDE context correctly.")
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(KdePOImporterTestCase))
- return suite
-
=== modified file 'lib/lp/translations/utilities/tests/test_mozilla_xpi_importer.py'
--- lib/lp/translations/utilities/tests/test_mozilla_xpi_importer.py 2010-10-04 19:50:45 +0000
+++ lib/lp/translations/utilities/tests/test_mozilla_xpi_importer.py 2011-08-12 12:59:24 +0000
@@ -45,7 +45,3 @@
self.importer.uses_source_string_msgids,
"MozillaXpiImporter format says it's not using alternative msgid"
" when it really does!")
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_mozilla_zip.py'
--- lib/lp/translations/utilities/tests/test_mozilla_zip.py 2010-10-04 19:50:45 +0000
+++ lib/lp/translations/utilities/tests/test_mozilla_zip.py 2011-08-12 12:59:24 +0000
@@ -111,8 +111,3 @@
),
'.'
])
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
-
=== modified file 'lib/lp/translations/utilities/tests/test_pluralforms.py'
--- lib/lp/translations/utilities/tests/test_pluralforms.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_pluralforms.py 2011-08-12 12:59:24 +0000
@@ -65,7 +65,3 @@
# Since 'n' can be zero as well, dividing by it won't work.
self.assertRaises(BadPluralExpression,
make_friendly_plural_forms, '(1/n)', 1)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_sanitize.py'
--- lib/lp/translations/utilities/tests/test_sanitize.py 2010-09-29 15:45:52 +0000
+++ lib/lp/translations/utilities/tests/test_sanitize.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lp.testing import TestCase
from lp.translations.utilities.sanitize import (
MixedNewlineMarkersError,
@@ -270,7 +268,3 @@
expected_sanitized,
sanitize_translations_from_webui(
self.english, translations, None))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_translation_exporter.py'
--- lib/lp/translations/utilities/tests/test_translation_exporter.py 2010-10-04 19:50:45 +0000
+++ lib/lp/translations/utilities/tests/test_translation_exporter.py 2011-08-12 12:59:24 +0000
@@ -90,10 +90,3 @@
self.assertEqual(
exporter_formats, [TranslationFileFormat.XPIPO],
'XPI source file should be exported as PO format')
-
-
-def test_suite():
- suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TranslationExporterTestCase))
- return suite
-
=== modified file 'lib/lp/translations/utilities/tests/test_translation_message_data.py'
--- lib/lp/translations/utilities/tests/test_translation_message_data.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_translation_message_data.py 2011-08-12 12:59:24 +0000
@@ -5,10 +5,7 @@
__metaclass__ = type
-from unittest import (
- defaultTestLoader,
- TestCase,
- )
+from unittest import TestCase
from lp.translations.interfaces.translationimporter import (
TranslationFormatSyntaxError,
@@ -77,7 +74,3 @@
self.assertEqual(
error.represent("(Default text, should not be returned.)"),
"Message has more than one translation for plural form 0.")
-
-
-def test_suite():
- return defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_validate.py'
--- lib/lp/translations/utilities/tests/test_validate.py 2010-09-28 14:06:50 +0000
+++ lib/lp/translations/utilities/tests/test_validate.py 2011-08-12 12:59:24 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lp.testing import TestCase
from lp.translations.utilities.validate import (
GettextValidationError,
@@ -80,7 +78,3 @@
GettextValidationError,
validate_translation, english_singular, english_plural,
translations, flags)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_dtd_format.py'
--- lib/lp/translations/utilities/tests/test_xpi_dtd_format.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_dtd_format.py 2011-08-12 12:59:24 +0000
@@ -44,7 +44,3 @@
self.assertRaises(TranslationFormatInvalidInputError, DtdFile, None,
'test.dtd', content)
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_header.py'
--- lib/lp/translations/utilities/tests/test_xpi_header.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_header.py 2011-08-12 12:59:24 +0000
@@ -127,7 +127,3 @@
u"\u0e40\u0e2d\u0e4b <eai@xxxxxxxxxxx>"])
self.assertEqual(header.getLastTranslator(),
(u"\u0e40\u0e2d\u0e4b", 'eai@xxxxxxxxxxx'))
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
-
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_import.py'
--- lib/lp/translations/utilities/tests/test_xpi_import.py 2011-05-27 21:12:25 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_import.py 2011-08-12 12:59:24 +0000
@@ -363,7 +363,3 @@
self.assertEqual(msgids, [
('firststring', 'First translatable string'),
('secondstring', 'Second translatable string')])
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_manifest.py'
--- lib/lp/translations/utilities/tests/test_xpi_manifest.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_manifest.py 2011-08-12 12:59:24 +0000
@@ -305,8 +305,3 @@
XpiManifest, """
locale browser en-US jar:locales
""")
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
-
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_properties_format.py'
--- lib/lp/translations/utilities/tests/test_xpi_properties_format.py 2010-08-20 20:31:18 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_properties_format.py 2011-08-12 12:59:24 +0000
@@ -301,7 +301,3 @@
""").strip()
self.assertEqual(self.exporter.export(file).strip(), expected)
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/translations/utilities/tests/test_xpi_search.py'
--- lib/lp/translations/utilities/tests/test_xpi_search.py 2010-10-29 10:17:14 +0000
+++ lib/lp/translations/utilities/tests/test_xpi_search.py 2011-08-12 12:59:24 +0000
@@ -81,7 +81,3 @@
text='foozilla.title'))
self.assertEquals(potmsgsets, [])
-
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
=== modified file 'lib/lp/vostok/browser/tests/test_root.py'
--- lib/lp/vostok/browser/tests/test_root.py 2010-10-02 06:27:13 +0000
+++ lib/lp/vostok/browser/tests/test_root.py 2011-08-12 12:59:24 +0000
@@ -6,7 +6,6 @@
__metaclass__ = type
import os
-import unittest
from zope.publisher.defaultview import getDefaultViewName
@@ -92,7 +91,3 @@
main_template_path = IMainTemplateFile(VostokTestRequest()).path
self.assertIn('lp/vostok', main_template_path)
self.assertTrue(os.path.isfile(main_template_path))
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/vostok/tests/test_publisher.py'
--- lib/lp/vostok/tests/test_publisher.py 2010-08-20 20:31:18 +0000
+++ lib/lp/vostok/tests/test_publisher.py 2011-08-12 12:59:24 +0000
@@ -5,8 +5,6 @@
__metaclass__ = type
-import unittest
-
from canonical.config import config
from canonical.testing.layers import FunctionalLayer
from lp.testing import TestCase
@@ -59,7 +57,3 @@
response._request = request
self.assertRaises(
ValueError, response.redirect, 'http://launchpad.dev')
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)