← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/we-prefer-distroseries-thank-you into lp:launchpad

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/we-prefer-distroseries-thank-you into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/launchpad/we-prefer-distroseries-thank-you/+merge/70282

I got sick and tired of having to look up makeDistroRelease every time I wanted to check something in the signature of factory.makeDistroSeries.  We abolished DistroRelease a long time ago; it's time we took our leave of makeDistroRelease as well.

A lot of files were affected, so inevitably there was some lint.  I fixed that, and also ran the automated tools we have for updating copyright lines and formatting imports.  But nothing substantial changed.

Well, apart from one thing maybe.  One test used this idiom:

    [] = foo.goBar()

…apparently to verify that goBar() returned an empty list.  This confused our linter to breaking point (it couldn't even give sensible line numbers) so I replaced it with something more conventional:

    self.assertContentEqual([], foo.goBar())


= Launchpad lint =

Lots cleaned up.  Some doctest lint is still there, because the violence involved in a proper fix would not be suitable for daytime internet.

{{{
Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/translations/tests/test_translations_to_review.py
  lib/lp/code/model/tests/test_seriessourcepackagebranch.py
  lib/lp/translations/tests/test_hastranslationtemplates.py
  lib/lp/bugs/model/tests/test_bugsummary.py
  lib/lp/code/xmlrpc/tests/test_codehosting.py
  lib/lp/registry/browser/tests/test_breadcrumbs.py
  lib/lp/registry/tests/test_suitesourcepackage.py
  lib/lp/translations/browser/tests/test_breadcrumbs.py
  lib/lp/registry/tests/test_distributionsourcepackage.py
  lib/lp/soyuz/tests/test_publishing.py
  lib/lp/code/tests/test_seriessourcepackagebranch.py
  lib/lp/code/tests/helpers.py
  lib/lp/code/browser/tests/test_branchlisting.py
  lib/lp/bugs/model/tests/test_bugtask.py
  lib/lp/registry/doc/distroseries.txt
  lib/lp/translations/tests/test_pofile.py
  lib/lp/bugs/doc/bugsummary.txt
  lib/lp/code/stories/branches/xx-distribution-branches.txt
  lib/lp/registry/browser/tests/distributionsourcepackage-views.txt
  lib/lp/translations/stories/translations/xx-translations.txt
  lib/lp/bugs/tests/test_searchtasks_webservice.py
  lib/lp/soyuz/browser/tests/test_sourceslistentries.py
  lib/lp/translations/stories/productseries/xx-productseries-translations.txt
  lib/lp/translations/tests/test_autoapproval.py
  lib/lp/registry/browser/tests/milestone-views.txt
  lib/lp/codehosting/inmemory.py
  lib/lp/registry/tests/test_sourcepackage.py
  lib/lp/registry/tests/test_packaging.py
  lib/lp/testing/factory.py
  lib/lp/bugs/doc/bug-nomination.txt
  lib/lp/code/stories/branches/xx-source-package-branches-empty.txt
  lib/lp/registry/browser/tests/productseries-views.txt
  lib/lp/translations/doc/distroseries-translations-copy.txt
  lib/lp/code/stories/branches/xx-source-package-branches-listing.txt
  lib/lp/code/model/tests/test_branchlookup.py
  lib/lp/codehosting/tests/test_branchdistro.py
  lib/lp/translations/scripts/tests/test_reupload_translations.py
  lib/lp/translations/browser/tests/test_distroserieslanguage_views.py
  lib/lp/code/model/tests/test_revisioncache.py
  lib/lp/translations/tests/test_setcurrenttranslation.py
  lib/lp/bugs/tests/test_bugchanges.py
  lib/lp/registry/browser/tests/pillar-views.txt
  lib/lp/registry/browser/tests/test_sourcepackage_views.py
  lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py
  lib/lp/registry/browser/tests/sourcepackage-views.txt
  lib/lp/registry/browser/tests/distroseries-views.txt
  lib/lp/code/stories/branches/xx-distroseries-branches.txt
  lib/lp/bugs/tests/test_bugnomination.py
  lib/lp/code/model/tests/test_branchcollection.py
  lib/lp/translations/stories/standalone/custom-language-codes.txt
  lib/lp/code/model/tests/test_branchnamespace.py
  lib/lp/soyuz/tests/test_packageset.py
  lib/lp/translations/browser/tests/translationimportqueue-views.txt
  lib/lp/registry/tests/test_distribution.py
  lib/lp/translations/tests/test_translationimportqueue.py
  lib/lp/translations/doc/canonical_url_examples.txt
  lib/lp/registry/tests/test_person.py
  lib/lp/testing/tests/test_factory.py
  lib/lp/registry/tests/test_distro_webservice.py
  lib/lp/translations/scripts/tests/test_translations_import.py
  lib/lp/bugs/browser/tests/test_buglisting.py

./lib/lp/registry/doc/distroseries.txt
     511: source exceeds 78 characters.
     512: source exceeds 78 characters.
     716: source exceeds 78 characters.
./lib/lp/code/stories/branches/xx-distribution-branches.txt
       1: narrative uses a moin header.
./lib/lp/translations/stories/translations/xx-translations.txt
       7: source has bad indentation.
      14: source has bad indentation.
      32: source has bad indentation.
      48: source has bad indentation.
      53: source has bad indentation.
      66: source has bad indentation.
      73: source has bad indentation.
      87: narrative uses a moin header.
      92: source has bad indentation.
     111: source has bad indentation.
     128: source has bad indentation.
     135: want exceeds 78 characters.
     137: want exceeds 78 characters.
     139: narrative exceeds 78 characters.
     141: source has bad indentation.
     152: source has bad indentation.
     156: source has bad indentation.
     157: want exceeds 78 characters.
     159: want exceeds 78 characters.
     163: source has bad indentation.
     167: source has bad indentation.
     168: want exceeds 78 characters.
     172: source has bad indentation.
     175: narrative uses a moin header.
     181: source exceeds 78 characters.
     181: source has bad indentation.
     189: narrative uses a moin header.
     194: source has bad indentation.
     203: source has bad indentation.
     217: source has bad indentation.
     224: narrative uses a moin header.
     235: source exceeds 78 characters.
     254: want exceeds 78 characters.
     266: want exceeds 78 characters.
     279: want exceeds 78 characters.
     292: want exceeds 78 characters.
     427: want exceeds 78 characters.
     439: want exceeds 78 characters.
     452: want exceeds 78 characters.
     465: want exceeds 78 characters.
./lib/lp/translations/stories/productseries/xx-productseries-translations.txt
      94: want exceeds 78 characters.
      95: want exceeds 78 characters.
./lib/lp/bugs/doc/bug-nomination.txt
       1: narrative uses a moin header.
     157: narrative uses a moin header.
     219: narrative uses a moin header.
     352: narrative uses a moin header.
     383: narrative uses a moin header.
     423: narrative uses a moin header.
     492: narrative uses a moin header.
     510: narrative uses a moin header.
./lib/lp/code/stories/branches/xx-source-package-branches-empty.txt
       1: narrative uses a moin header.
./lib/lp/code/stories/branches/xx-source-package-branches-listing.txt
       1: narrative uses a moin header.
./lib/lp/code/stories/branches/xx-distroseries-branches.txt
       1: narrative uses a moin header.
}}}
-- 
https://code.launchpad.net/~jtv/launchpad/we-prefer-distroseries-thank-you/+merge/70282
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/we-prefer-distroseries-thank-you into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
--- lib/lp/bugs/browser/tests/test_buglisting.py	2011-05-27 21:12:25 +0000
+++ lib/lp/bugs/browser/tests/test_buglisting.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -86,8 +86,7 @@
 
     def _makeSourcePackage(self):
         distro = self.factory.makeDistribution('test-distro')
-        series = self.factory.makeDistroRelease(
-            distribution=distro, name='test-series')
+        self.factory.makeDistroSeries(distribution=distro, name='test-series')
         return self.factory.makeSourcePackage('test-sp', distro.currentseries)
 
     def test_sourcepackage_unknown_bugtracker_message(self):
@@ -146,7 +145,9 @@
         view = create_initialized_view(product, '+bugs')
         Store.of(product).invalidate()
         with StormStatementRecorder() as recorder:
-            prejoins=[(Person, LeftJoin(Person, BugTask.owner==Person.id))]
+            prejoins = [
+                (Person, LeftJoin(Person, BugTask.owner == Person.id)),
+                ]
             bugtasks = list(view.searchUnbatched(prejoins=prejoins))
             self.assertEqual(
                 [bugtask_1, bugtask_2], bugtasks)

=== modified file 'lib/lp/bugs/doc/bug-nomination.txt'
--- lib/lp/bugs/doc/bug-nomination.txt	2011-08-01 05:25:59 +0000
+++ lib/lp/bugs/doc/bug-nomination.txt	2011-08-03 16:08:31 +0000
@@ -531,7 +531,7 @@
     >>> from lp.registry.interfaces.series import SeriesStatus
 
     >>> login("foo.bar@xxxxxxxxxxxxx")
-    >>> ubuntu_edgy = factory.makeDistroRelease(
+    >>> ubuntu_edgy = factory.makeDistroSeries(
     ...     distribution=ubuntu, version='6.10',
     ...     status=SeriesStatus.OBSOLETE)
     >>> login("no-priv@xxxxxxxxxxxxx")

=== modified file 'lib/lp/bugs/doc/bugsummary.txt'
--- lib/lp/bugs/doc/bugsummary.txt	2011-06-14 17:46:12 +0000
+++ lib/lp/bugs/doc/bugsummary.txt	2011-08-03 16:08:31 +0000
@@ -366,7 +366,7 @@
 column.
 
     >>> distribution_c = factory.makeDistribution(name='di-c')
-    >>> series_c = factory.makeDistroRelease(
+    >>> series_c = factory.makeDistroSeries(
     ...     distribution=distribution_c, name='ds-c')
     >>> bug = factory.makeBugTask(target=series_c)
     >>> print_find(
@@ -413,7 +413,7 @@
     - bug_z is public.
 
     >>> distro_p = factory.makeDistribution(name='di-p')
-    >>> series_p = factory.makeDistroRelease(
+    >>> series_p = factory.makeDistroSeries(
     ...     distribution=distro_p, name='ds-p')
     >>> bug_a = factory.makeBug(
     ...     owner=owner, distribution=distro_p, private=True)

=== modified file 'lib/lp/bugs/model/tests/test_bugsummary.py'
--- lib/lp/bugs/model/tests/test_bugsummary.py	2011-06-14 17:46:12 +0000
+++ lib/lp/bugs/model/tests/test_bugsummary.py	2011-08-03 16:08:31 +0000
@@ -556,7 +556,7 @@
             0)
 
     def test_addDistroSeries(self):
-        series = self.factory.makeDistroRelease()
+        series = self.factory.makeDistroSeries()
         distribution = series.distribution
 
         # This first creates a BugTask on the distribution. We can't
@@ -572,8 +572,8 @@
 
     def test_changeDistroSeries(self):
         distribution = self.factory.makeDistribution()
-        series_a = self.factory.makeDistroRelease(distribution=distribution)
-        series_b = self.factory.makeDistroRelease(distribution=distribution)
+        series_a = self.factory.makeDistroSeries(distribution=distribution)
+        series_b = self.factory.makeDistroSeries(distribution=distribution)
 
         bug_task = self.factory.makeBugTask(target=series_a)
 
@@ -600,7 +600,7 @@
             1)
 
     def test_removeDistroSeries(self):
-        series = self.factory.makeDistroRelease()
+        series = self.factory.makeDistroSeries()
         distribution = series.distribution
         bug_task = self.factory.makeBugTask(target=series)
 
@@ -722,7 +722,7 @@
 
     def test_addDistroSeriesSourcePackage(self):
         distribution = self.factory.makeDistribution()
-        series = self.factory.makeDistroRelease(distribution=distribution)
+        series = self.factory.makeDistroSeries(distribution=distribution)
         package = self.factory.makeSourcePackage(distroseries=series)
         sourcepackagename = package.sourcepackagename
         self.factory.makeBugTask(target=package)
@@ -750,7 +750,7 @@
 
     def test_changeDistroSeriesSourcePackage(self):
         distribution = self.factory.makeDistribution()
-        series = self.factory.makeDistroRelease(distribution=distribution)
+        series = self.factory.makeDistroSeries(distribution=distribution)
         package_a = self.factory.makeSourcePackage(distroseries=series)
         package_b = self.factory.makeSourcePackage(distroseries=series)
         sourcepackagename_a = package_a.sourcepackagename
@@ -823,7 +823,7 @@
 
     def test_removeDistroSeriesSourcePackage(self):
         distribution = self.factory.makeDistribution()
-        series = self.factory.makeDistroRelease(distribution=distribution)
+        series = self.factory.makeDistroSeries(distribution=distribution)
         package = self.factory.makeSourcePackage(distroseries=series)
         sourcepackagename = package.sourcepackagename
         bug_task = self.factory.makeBugTask(target=package)

=== modified file 'lib/lp/bugs/model/tests/test_bugtask.py'
--- lib/lp/bugs/model/tests/test_bugtask.py	2011-08-01 05:25:59 +0000
+++ lib/lp/bugs/model/tests/test_bugtask.py	2011-08-03 16:08:31 +0000
@@ -45,9 +45,7 @@
     validate_new_target,
     validate_target,
     )
-from lp.bugs.tests.bug import (
-    create_old_bug,
-    )
+from lp.bugs.tests.bug import create_old_bug
 from lp.hardwaredb.interfaces.hwdb import (
     HWBus,
     IHWDeviceSet,
@@ -968,7 +966,7 @@
     def test_omit_targeted_default_is_false(self):
         # The default value of omit_targeted is false so bugs targeted
         # to a series are not hidden.
-        target = self.factory.makeDistroRelease()
+        target = self.factory.makeDistroSeries()
         self.login()
         task1 = self.factory.makeBugTask(target=target)
         default_result = target.searchTasks(None)
@@ -1394,7 +1392,7 @@
         self.owner = self.factory.makePerson()
         self.distro = self.factory.makeDistribution(
             name="eggs", owner=self.owner, bug_supervisor=self.owner)
-        distro_release = self.factory.makeDistroRelease(
+        distro_release = self.factory.makeDistroSeries(
             distribution=self.distro, registrant=self.owner)
         source_package = self.factory.makeSourcePackage(
             sourcepackagename="spam", distroseries=distro_release)

=== modified file 'lib/lp/bugs/tests/test_bugchanges.py'
--- lib/lp/bugs/tests/test_bugchanges.py	2011-05-19 13:18:59 +0000
+++ lib/lp/bugs/tests/test_bugchanges.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for recording changes done to a bug."""
@@ -1343,7 +1343,7 @@
         # Nominating a bug to be fixed in a product series adds an item
         # to the activity log only.
         distribution = self.factory.makeDistribution()
-        series = self.factory.makeDistroRelease(distribution=distribution)
+        series = self.factory.makeDistroSeries(distribution=distribution)
         self.bug.addTask(self.user, distribution)
         self.saveOldChanges()
 
@@ -1658,7 +1658,6 @@
             'oldvalue': 'New',
             }
 
-
         conversion_notification = {
             'person': self.user,
             'text': (

=== modified file 'lib/lp/bugs/tests/test_bugnomination.py'
--- lib/lp/bugs/tests/test_bugnomination.py	2011-05-09 07:01:07 +0000
+++ lib/lp/bugs/tests/test_bugnomination.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests related to bug nominations."""
@@ -78,13 +78,13 @@
     """Test IBug.canBeNominated for IDistroSeries nominations."""
 
     def setUpTarget(self):
-        self.series = self.factory.makeDistroRelease()
+        self.series = self.factory.makeDistroSeries()
         # The factory can't create a distro bug directly.
         self.bug = self.factory.makeBug()
         self.bug.addTask(self.eric, self.series.distribution)
         self.milestone = self.factory.makeMilestone(
             distribution=self.series.distribution)
-        self.random_series = self.factory.makeDistroRelease()
+        self.random_series = self.factory.makeDistroSeries()
 
     def test_not_canBeNominatedFor_source_package(self):
         # A bug may not be nominated directly for a source package. The

=== modified file 'lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py'
--- lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py	2010-10-19 20:56:54 +0000
+++ lib/lp/bugs/tests/test_bugsupervisor_bugnomination.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests related to bug nominations for an object with a bug supervisor."""
@@ -11,7 +11,6 @@
     logout,
     )
 from canonical.testing.layers import DatabaseFunctionalLayer
-
 from lp.bugs.interfaces.bugnomination import NominationError
 from lp.testing import TestCaseWithFactory
 
@@ -61,8 +60,8 @@
     """Test IBug.addNomination for IProductSeries nominations."""
 
     def setUpTarget(self):
-        self.product = self.factory.makeProduct(official_malone = True,
-            bug_supervisor=self.bug_supervisor,
+        self.product = self.factory.makeProduct(
+            official_malone=True, bug_supervisor=self.bug_supervisor,
             owner=self.owner)
         self.series = self.factory.makeProductSeries(product=self.product)
         self.bug = self.factory.makeBug(product=self.product)
@@ -77,7 +76,7 @@
         self.distro = self.factory.makeDistribution(
             bug_supervisor=self.bug_supervisor,
             owner=self.owner)
-        self.series = self.factory.makeDistroRelease(distribution=self.distro)
+        self.series = self.factory.makeDistroSeries(distribution=self.distro)
         # The factory can't create a distro bug directly.
         self.bug = self.factory.makeBug()
         self.bug.addTask(self.bug_supervisor, self.distro)

=== modified file 'lib/lp/bugs/tests/test_searchtasks_webservice.py'
--- lib/lp/bugs/tests/test_searchtasks_webservice.py	2011-02-01 16:31:36 +0000
+++ lib/lp/bugs/tests/test_searchtasks_webservice.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Webservice unit tests related to Launchpad Bugs."""
@@ -23,7 +23,7 @@
         self.owner = self.factory.makePerson()
         with person_logged_in(self.owner):
             self.distro = self.factory.makeDistribution(name='mebuntu')
-        self.release = self.factory.makeDistroRelease(
+        self.release = self.factory.makeDistroSeries(
             name='inkanyamba', distribution=self.distro)
         self.bug = self.factory.makeBugTask(target=self.release)
         self.webservice = LaunchpadWebServiceCaller(

=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
--- lib/lp/code/browser/tests/test_branchlisting.py	2011-07-04 23:45:43 +0000
+++ lib/lp/code/browser/tests/test_branchlisting.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for branch listing."""
@@ -30,10 +30,10 @@
     SourcePackageBranchesView,
     )
 from lp.code.enums import BranchVisibilityRule
+from lp.code.model.branch import Branch
 from lp.code.model.seriessourcepackagebranch import (
     SeriesSourcePackageBranchSet,
     )
-from lp.code.model.branch import Branch
 from lp.registry.interfaces.person import (
     IPersonSet,
     PersonVisibility,
@@ -199,7 +199,7 @@
         sourcepackagename = self.factory.makeSourcePackageName()
         packages = {}
         for version in ("1.0", "2.0", "3.0"):
-            series = self.factory.makeDistroRelease(
+            series = self.factory.makeDistroSeries(
                 distribution=distro, version=version)
             package = self.factory.makeSourcePackage(
                 distroseries=series, sourcepackagename=sourcepackagename)
@@ -237,7 +237,7 @@
         # source package.
         self.distro = self.factory.makeDistribution()
         for version in ("1.0", "2.0", "3.0"):
-            self.factory.makeDistroRelease(
+            self.factory.makeDistroSeries(
                 distribution=self.distro, version=version)
         self.sourcepackagename = self.factory.makeSourcePackageName()
         self.distro_source_package = (

=== modified file 'lib/lp/code/model/tests/test_branchcollection.py'
--- lib/lp/code/model/tests/test_branchcollection.py	2011-07-29 18:30:49 +0000
+++ lib/lp/code/model/tests/test_branchcollection.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for branch collections."""
@@ -77,7 +77,7 @@
 
     def test_distro_series(self):
         # A distro series can be adapted to a branch collection.
-        distro_series = self.factory.makeDistroRelease()
+        distro_series = self.factory.makeDistroSeries()
         collection = IBranchCollection(distro_series, None)
         self.assertIsNot(None, collection)
 
@@ -272,9 +272,9 @@
         # 'inDistribution' returns a new collection that only has branches
         # that are source package branches associated with distribution series
         # for the distribution specified.
-        series_one = self.factory.makeDistroRelease()
+        series_one = self.factory.makeDistroSeries()
         distro = series_one.distribution
-        series_two = self.factory.makeDistroRelease(distribution=distro)
+        series_two = self.factory.makeDistroSeries(distribution=distro)
         # Make two branches in the same distribution, but different series and
         # source packages.
         branch = self.factory.makePackageBranch(distroseries=series_one)
@@ -291,8 +291,8 @@
         # 'inDistroSeries' returns a new collection that only has branches
         # that are source package branches associated with the distribution
         # series specified.
-        series_one = self.factory.makeDistroRelease()
-        series_two = self.factory.makeDistroRelease(
+        series_one = self.factory.makeDistroSeries()
+        series_two = self.factory.makeDistroSeries(
             distribution=series_one.distribution)
         # Make two branches in the same distroseries, but different source
         # packages.
@@ -343,8 +343,8 @@
         # 'inDistributionSourcePackage' returns a new collection that only has
         # branches for the source package across any distroseries of the
         # distribution.
-        series_one = self.factory.makeDistroRelease()
-        series_two = self.factory.makeDistroRelease(
+        series_one = self.factory.makeDistroSeries()
+        series_two = self.factory.makeDistroSeries(
             distribution=series_one.distribution)
         package = self.factory.makeSourcePackageName()
         sourcepackage_one = self.factory.makeSourcePackage(

=== modified file 'lib/lp/code/model/tests/test_branchlookup.py'
--- lib/lp/code/model/tests/test_branchlookup.py	2011-06-03 20:13:14 +0000
+++ lib/lp/code/model/tests/test_branchlookup.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for the IBranchLookup implementation."""
@@ -249,7 +249,7 @@
 
     def test_missing_package_branch(self):
         owner = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = get_branch_namespace(
             owner, distroseries=distroseries,
@@ -259,7 +259,7 @@
 
     def test_missing_suffixed_package_branch(self):
         owner = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = get_branch_namespace(
             owner, distroseries=distroseries,
@@ -495,7 +495,7 @@
     def test_no_such_sourcepackagename(self):
         # `traverse` raises `NoSuchSourcePackageName` if the package in
         # distro/series/package doesn't exist.
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         path = '%s/%s/doesntexist' % (
             distroseries.distribution.name, distroseries.name)
         self.assertRaises(

=== modified file 'lib/lp/code/model/tests/test_branchnamespace.py'
--- lib/lp/code/model/tests/test_branchnamespace.py	2011-07-11 03:58:41 +0000
+++ lib/lp/code/model/tests/test_branchnamespace.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for `IBranchNamespace` implementations."""
@@ -11,7 +11,6 @@
 from zope.security.proxy import removeSecurityProxy
 
 from canonical.testing.layers import DatabaseFunctionalLayer
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.validators import LaunchpadValidationError
 from lp.code.enums import (
     BranchLifecycleStatus,
@@ -158,7 +157,7 @@
     def test_isNameUsed_yes(self):
         namespace = self.getNamespace()
         branch_name = self.factory.getUniqueString()
-        branch = namespace.createBranch(
+        namespace.createBranch(
             BranchType.HOSTED, branch_name,
             removeSecurityProxy(namespace).owner)
         self.assertEqual(True, namespace.isNameUsed(branch_name))
@@ -423,14 +422,14 @@
             person = self.factory.makePerson()
         return get_branch_namespace(
             person=person,
-            distroseries=self.factory.makeDistroRelease(),
+            distroseries=self.factory.makeDistroSeries(),
             sourcepackagename=self.factory.makeSourcePackageName())
 
     def test_name(self):
         # A package namespace has branches that start with
         # ~foo/ubuntu/spicy/packagename.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = PackageNamespace(
             person, SourcePackage(sourcepackagename, distroseries))
@@ -443,7 +442,7 @@
     def test_owner(self):
         # The person passed to a package namespace is the owner.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = PackageNamespace(
             person, SourcePackage(sourcepackagename, distroseries))
@@ -466,7 +465,7 @@
     def test_subscriber(self):
         # There are no implicit subscribers for a personal namespace.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = PackageNamespace(
             person, SourcePackage(sourcepackagename, distroseries))
@@ -495,7 +494,7 @@
 
     def test_get_package(self):
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         namespace = get_branch_namespace(
             person=person, distroseries=distroseries,
@@ -557,7 +556,7 @@
 
     def test_lookup_package_no_source_package(self):
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.assertRaises(
             NoSuchSourcePackageName, lookup_branch_namespace,
             '~%s/%s/%s/no-such-spn' % (
@@ -585,7 +584,7 @@
         # ~user/no-such-product and ~user/no-such-distro, so we just raise
         # NoSuchProduct, which is perhaps the most common case.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.assertRaises(
             NoSuchProduct, lookup_branch_namespace,
             '~%s/%s' % (person.name, distroseries.distribution.name))
@@ -594,7 +593,7 @@
         # Given a too-short path to a package branch namespace, lookup will
         # raise an InvalidNamespace error.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.assertInvalidName(
             '~%s/%s/%s' % (
                 person.name, distroseries.distribution.name,
@@ -616,7 +615,7 @@
     def test_lookup_long_name_sourcepackage(self):
         # Given a too-long name, lookup will raise an InvalidNamespace error.
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         self.assertInvalidName(
             '~%s/%s/%s/%s/foo' % (
@@ -798,7 +797,7 @@
 
     def test_traverse_sourcepackagename_not_found(self):
         person = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         distro = distroseries.distribution
         segments = iter(
             [person.name, distro.name, distroseries.name, 'no-such-package',
@@ -862,7 +861,7 @@
         # A member of a team is able to create a branch on this namespace.
         # This is a team junk branch.
         person = self.factory.makePerson()
-        team = self.factory.makeTeam(owner=person)
+        self.factory.makeTeam(owner=person)
         namespace = self._getNamespace(person)
         self.assertTrue(namespace.canCreateBranches(person))
 
@@ -870,7 +869,7 @@
         # A person who is not part of the team cannot create branches for the
         # personal team target.
         person = self.factory.makePerson()
-        team = self.factory.makeTeam(owner=person)
+        self.factory.makeTeam(owner=person)
         namespace = self._getNamespace(person)
         self.assertFalse(
             namespace.canCreateBranches(self.factory.makePerson()))

=== modified file 'lib/lp/code/model/tests/test_revisioncache.py'
--- lib/lp/code/model/tests/test_revisioncache.py	2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/tests/test_revisioncache.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests relating to the revision cache."""
@@ -9,7 +9,6 @@
     datetime,
     timedelta,
     )
-import unittest
 
 import pytz
 from zope.component import getUtility
@@ -60,7 +59,7 @@
 
     def test_distro_series(self):
         # A distro series can be adapted to a revision cache.
-        distro_series = self.factory.makeDistroRelease()
+        distro_series = self.factory.makeDistroSeries()
         cache = IRevisionCache(distro_series, None)
         self.assertIsNot(None, cache)
 
@@ -177,7 +176,8 @@
         self.assertEqual(3, cache.count())
         # Limiting to public revisions does not get the private revisions.
         self.assertEqual(2, cache.public().count())
-        self.assertCollectionContents([revision, public_revision], cache.public())
+        self.assertCollectionContents(
+            [revision, public_revision], cache.public())
 
     def test_in_product(self):
         # Revisions in a particular product can be restricted using the
@@ -224,9 +224,9 @@
     def test_in_distribution(self):
         # Check inDistribution limits to those revisions associated with
         # distribution series related to the distro.
-        distroseries1 = self.factory.makeDistroRelease()
+        distroseries1 = self.factory.makeDistroSeries()
         distro = distroseries1.distribution
-        distroseries2 = self.factory.makeDistroRelease(distribution=distro)
+        distroseries2 = self.factory.makeDistroSeries(distribution=distro)
         # Two revisions associated with sourcepackages in the series for the
         # distro.
         rev1 = self.makeCachedRevision(
@@ -245,9 +245,9 @@
     def test_in_distro_series(self):
         # Check that inDistroSeries limits the revisions to those in the
         # distroseries specified.
-        distroseries1 = self.factory.makeDistroRelease()
+        distroseries1 = self.factory.makeDistroSeries()
         distro = distroseries1.distribution
-        distroseries2 = self.factory.makeDistroRelease(distribution=distro)
+        distroseries2 = self.factory.makeDistroSeries(distribution=distro)
         # Two revisions associated with sourcepackages in the distro series we
         # care about.
         rev1 = self.makeCachedRevision(
@@ -271,9 +271,9 @@
     def test_in_distribution_source_package(self):
         # Check that inDistributionSourcePackage limits to revisions in
         # different distro series for the same source package name.
-        distroseries1 = self.factory.makeDistroRelease()
+        distroseries1 = self.factory.makeDistroSeries()
         distro = distroseries1.distribution
-        distroseries2 = self.factory.makeDistroRelease(distribution=distro)
+        distroseries2 = self.factory.makeDistroSeries(distribution=distro)
         # Two revisions associated with the same sourcepackagename in the
         # distro series we care about.
         sourcepackagename = self.factory.makeSourcePackageName()
@@ -359,14 +359,8 @@
         # If there are multiple revisions with the same revision author text,
         # but not linked to a Launchpad person, then that revision_text is
         # counted as one author.
-        revisions = [
+        for counter in xrange(4):
             self.makeCachedRevision(revision=self.factory.makeRevision(
-                    author="Foo <foo@xxxxxxxxxxx>"))
-            for i in range(4)]
+                author="Foo <foo@xxxxxxxxxxx>"))
         revision_cache = getUtility(IRevisionCache)
         self.assertEqual(1, revision_cache.authorCount())
-
-
-def test_suite():
-    return unittest.TestLoader().loadTestsFromName(__name__)
-

=== modified file 'lib/lp/code/model/tests/test_seriessourcepackagebranch.py'
--- lib/lp/code/model/tests/test_seriessourcepackagebranch.py	2010-08-20 20:31:18 +0000
+++ lib/lp/code/model/tests/test_seriessourcepackagebranch.py	2011-08-03 16:08:31 +0000
@@ -1,12 +1,10 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Model tests for distro series source package branch links."""
 
 __metaclass__ = type
 
-import unittest
-
 from canonical.testing.layers import DatabaseFunctionalLayer
 from lp.code.model.seriessourcepackagebranch import (
     SeriesSourcePackageBranchSet,
@@ -59,7 +57,7 @@
         # SeriesSourcePackageBranchSet.delete removes the link between a
         # particular branch and a (distro_series, pocket, sourcepackagename)
         # tupled.
-        distro_series = self.factory.makeDistroRelease()
+        distro_series = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         sourcepackage = self.factory.makeSourcePackage(
             sourcepackagename=sourcepackagename, distroseries=distro_series)
@@ -77,8 +75,3 @@
         links = self.link_set.findForSourcePackage(sourcepackage)
         self.assertEqual(
             sorted([branch_release]), sorted([link.branch for link in links]))
-
-
-def test_suite():
-    return unittest.TestLoader().loadTestsFromName(__name__)
-

=== modified file 'lib/lp/code/stories/branches/xx-distribution-branches.txt'
--- lib/lp/code/stories/branches/xx-distribution-branches.txt	2010-05-13 16:22:19 +0000
+++ lib/lp/code/stories/branches/xx-distribution-branches.txt	2011-08-03 16:08:31 +0000
@@ -5,8 +5,8 @@
 
     >>> login('admin@xxxxxxxxxxxxx')
     >>> mint = factory.makeDistribution(name='mint')
-    >>> old = factory.makeDistroRelease(mint, name='old')
-    >>> stable = factory.makeDistroRelease(mint, name='stable')
+    >>> old = factory.makeDistroSeries(mint, name='old')
+    >>> stable = factory.makeDistroSeries(mint, name='stable')
     >>> eric = factory.makePerson(name='eric')
     >>> twisted = factory.makeSourcePackageName('twisted')
     >>> branch = factory.makePackageBranch(

=== modified file 'lib/lp/code/stories/branches/xx-distroseries-branches.txt'
--- lib/lp/code/stories/branches/xx-distroseries-branches.txt	2010-05-13 16:22:19 +0000
+++ lib/lp/code/stories/branches/xx-distroseries-branches.txt	2011-08-03 16:08:31 +0000
@@ -5,7 +5,7 @@
 
     >>> login('admin@xxxxxxxxxxxxx')
     >>> mint = factory.makeDistribution(name='mint')
-    >>> stable = factory.makeDistroRelease(mint, name='stable')
+    >>> stable = factory.makeDistroSeries(mint, name='stable')
     >>> eric = factory.makePerson(name='eric')
     >>> twisted = factory.makeSourcePackageName('twisted')
     >>> branch = factory.makePackageBranch(

=== modified file 'lib/lp/code/stories/branches/xx-source-package-branches-empty.txt'
--- lib/lp/code/stories/branches/xx-source-package-branches-empty.txt	2011-06-29 15:06:32 +0000
+++ lib/lp/code/stories/branches/xx-source-package-branches-empty.txt	2011-08-03 16:08:31 +0000
@@ -9,7 +9,7 @@
     >>> from lp.registry.model.sourcepackage import SourcePackage
     >>> def make_source_package(distro, series, name):
     ...     distro = factory.makeDistribution(name=distro, displayname=distro)
-    ...     distroseries = factory.makeDistroRelease(
+    ...     distroseries = factory.makeDistroSeries(
     ...         name=series, distribution=distro)
     ...     sourcepackagename = factory.makeSourcePackageName(name=name)
     ...     return SourcePackage(sourcepackagename, distroseries)

=== modified file 'lib/lp/code/stories/branches/xx-source-package-branches-listing.txt'
--- lib/lp/code/stories/branches/xx-source-package-branches-listing.txt	2010-08-23 03:30:54 +0000
+++ lib/lp/code/stories/branches/xx-source-package-branches-listing.txt	2011-08-03 16:08:31 +0000
@@ -8,7 +8,7 @@
     >>> from lp.registry.model.sourcepackage import SourcePackage
     >>> def make_source_package(distro, series, name):
     ...     distro = factory.makeDistribution(name=distro, displayname=distro)
-    ...     distroseries = factory.makeDistroRelease(
+    ...     distroseries = factory.makeDistroSeries(
     ...         name=series, distribution=distro)
     ...     sourcepackagename = factory.makeSourcePackageName(name=name)
     ...     return SourcePackage(sourcepackagename, distroseries)
@@ -49,7 +49,7 @@
 
     >>> login(ANONYMOUS)
     >>> distro = branch1.distroseries.distribution
-    >>> next_series = factory.makeDistroRelease(
+    >>> next_series = factory.makeDistroSeries(
     ...     name='next', distribution=distro)
     >>> source_package = factory.makeSourcePackage(
     ...     sourcepackagename=branch1.sourcepackagename,

=== modified file 'lib/lp/code/tests/helpers.py'
--- lib/lp/code/tests/helpers.py	2011-06-03 16:00:01 +0000
+++ lib/lp/code/tests/helpers.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Helper functions for code testing live here."""
@@ -34,7 +34,7 @@
 from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
 from lp.code.interfaces.revision import IRevisionSet
 from lp.code.model.seriessourcepackagebranch import (
-    SeriesSourcePackageBranchSet
+    SeriesSourcePackageBranchSet,
     )
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.registry.interfaces.series import SeriesStatus
@@ -125,7 +125,7 @@
 def make_linked_package_branch(factory, distribution=None,
                                sourcepackagename=None):
     """Make a new package branch and make it official."""
-    distro_series = factory.makeDistroRelease(distribution)
+    distro_series = factory.makeDistroSeries(distribution)
     source_package = factory.makeSourcePackage(
         sourcepackagename=sourcepackagename, distroseries=distro_series)
     branch = factory.makePackageBranch(sourcepackage=source_package)
@@ -225,7 +225,7 @@
         ("dead", "0.1", SeriesStatus.OBSOLETE),
         ]
     for name, version, status in series:
-        factory.makeDistroRelease(
+        factory.makeDistroSeries(
             distribution=mint, version=version, status=status, name=name)
 
     for pkg_index, name in enumerate(['twisted', 'zope', 'bzr', 'python']):

=== modified file 'lib/lp/code/tests/test_seriessourcepackagebranch.py'
--- lib/lp/code/tests/test_seriessourcepackagebranch.py	2011-06-02 20:53:43 +0000
+++ lib/lp/code/tests/test_seriessourcepackagebranch.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for ISeriesSourcePackageBranch."""
@@ -32,7 +32,7 @@
     def test_new_sets_attributes(self):
         # SeriesSourcePackageBranchSet.new sets all the defined attributes on
         # the interface.
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         registrant = self.factory.makePerson()
         branch = self.factory.makeAnyBranch()
@@ -50,7 +50,7 @@
     def test_new_inserts_into_db(self):
         # SeriesSourcePackageBranchSet.new inserts the new object into the
         # database, giving it an ID.
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         registrant = self.factory.makePerson()
         branch = self.factory.makeAnyBranch()
@@ -63,7 +63,7 @@
     def test_new_returns_ISeriesSourcePackageBranch(self):
         # SeriesSourcePackageBranchSet.new returns an
         # ISeriesSourcePackageBranch, know what I mean?
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         registrant = self.factory.makePerson()
         branch = self.factory.makeAnyBranch()

=== modified file 'lib/lp/code/xmlrpc/tests/test_codehosting.py'
--- lib/lp/code/xmlrpc/tests/test_codehosting.py	2011-04-18 01:37:03 +0000
+++ lib/lp/code/xmlrpc/tests/test_codehosting.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for the internal codehosting API."""
@@ -392,7 +392,7 @@
         # If createBranch is called with the path to a non-existent distro, it
         # will return a Fault saying so in plain English.
         owner = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         sourcepackagename = self.factory.makeSourcePackageName()
         branch_name = self.factory.getUniqueString()
         unique_name = '/~%s/ningnangnong/%s/%s/%s' % (
@@ -422,7 +422,7 @@
         # If createBranch is called with the path to an invalid source
         # package, it will return a Fault saying so.
         owner = self.factory.makePerson()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         branch_name = self.factory.getUniqueString()
         unique_name = '/~%s/%s/%s/ningnangnong/%s' % (
             owner.name, distroseries.distribution.name, distroseries.name,
@@ -974,7 +974,8 @@
         self.assertNotFound(requester, path)
 
     def test_translatePath_branch_alias_invalid_product_name(self):
-        # translatePath returns a not found when there is an invalid product name.
+        # translatePath returns a not found when there is an invalid product
+        # name.
         requester = self.factory.makePerson()
         invalid_name = '_' + self.factory.getUniqueString()
         path = '/%s/%s' % (BRANCH_ALIAS_PREFIX, invalid_name)
@@ -1012,9 +1013,12 @@
         branch = removeSecurityProxy(self.factory.makeAnyBranch())
         path = escape(u'%s/foo/bar' % branch_id_alias(branch))
         translation = self.codehosting_api.translatePath(requester.id, path)
-        self.assertEqual(
-            (BRANCH_TRANSPORT, {'id': branch.id, 'writable': False}, 'foo/bar'),
-            translation)
+        expected = (
+            BRANCH_TRANSPORT,
+            {'id': branch.id, 'writable': False},
+            'foo/bar',
+            )
+        self.assertEqual(expected, translation)
 
     def test_translatePath_branch_id_alias_owned(self):
         # Even if the the requester is the owner, the branch is read only.

=== modified file 'lib/lp/codehosting/inmemory.py'
--- lib/lp/codehosting/inmemory.py	2011-04-18 01:37:03 +0000
+++ lib/lp/codehosting/inmemory.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """In-memory doubles of core codehosting objects."""
@@ -446,15 +446,13 @@
         self._distribution_set._add(distro)
         return distro
 
-    def makeDistroRelease(self):
+    def makeDistroSeries(self):
         distro = self.makeDistribution()
         distroseries_name = self.getUniqueString()
         distroseries = FakeDistroSeries(distroseries_name, distro)
         self._distroseries_set._add(distroseries)
         return distroseries
 
-    makeDistroSeries = makeDistroRelease
-
     def makeSourcePackageName(self):
         sourcepackagename = FakeSourcePackageName(self.getUniqueString())
         self._sourcepackagename_set._add(sourcepackagename)
@@ -462,7 +460,7 @@
 
     def makeSourcePackage(self, distroseries=None, sourcepackagename=None):
         if distroseries is None:
-            distroseries = self.makeDistroRelease()
+            distroseries = self.makeDistroSeries()
         if sourcepackagename is None:
             sourcepackagename = self.makeSourcePackageName()
         package = FakeSourcePackage(sourcepackagename, distroseries)
@@ -859,7 +857,8 @@
                 if product:
                     branch = product.development_focus.branch
                 else:
-                    branch = self._branch_set._find(unique_name=component_name)
+                    branch = self._branch_set._find(
+                        unique_name=component_name)
             else:
                 branch = self._branch_set._find(unique_name=first)
             if branch is not None:

=== modified file 'lib/lp/codehosting/tests/test_branchdistro.py'
--- lib/lp/codehosting/tests/test_branchdistro.py	2011-05-16 15:08:21 +0000
+++ lib/lp/codehosting/tests/test_branchdistro.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for making new source package branches just after a distro release.
@@ -39,8 +39,8 @@
 from lp.codehosting.vfs import branch_id_to_path
 from lp.registry.interfaces.pocket import PackagePublishingPocket
 from lp.services.log.logger import (
+    BufferLogger,
     FakeLogger,
-    BufferLogger,
     )
 from lp.services.osutils import override_environ
 from lp.testing import TestCaseWithFactory
@@ -151,9 +151,9 @@
         `assertLogMessages` below.
         """
         if distroseries is None:
-            distroseries = self.factory.makeDistroRelease()
+            distroseries = self.factory.makeDistroSeries()
         self._log_file = StringIO()
-        new_distroseries = self.factory.makeDistroRelease(
+        new_distroseries = self.factory.makeDistroSeries(
             distribution=distroseries.distribution)
         transaction.commit()
         self.layer.switchDbUser('branch-distro')
@@ -190,13 +190,13 @@
         # distroseries passed are not from the same distribution.
         self.assertRaises(
             AssertionError, DistroBrancher, None,
-            self.factory.makeDistroRelease(),
-            self.factory.makeDistroRelease())
+            self.factory.makeDistroSeries(),
+            self.factory.makeDistroSeries())
 
     def test_DistroBrancher_same_distroseries_check(self):
         # DistroBrancher.__init__ raises AssertionError if passed the same
         # distroseries twice.
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.assertRaises(
             AssertionError, DistroBrancher, None, distroseries, distroseries)
 
@@ -204,9 +204,9 @@
         # DistroBrancher.fromNames constructs a DistroBrancher from the names
         # of a distribution and two distroseries within it.
         distribution = self.factory.makeDistribution()
-        distroseries1 = self.factory.makeDistroRelease(
+        distroseries1 = self.factory.makeDistroSeries(
             distribution=distribution)
-        distroseries2 = self.factory.makeDistroRelease(
+        distroseries2 = self.factory.makeDistroSeries(
             distribution=distribution)
         brancher = DistroBrancher.fromNames(
             None, distribution.name, distroseries1.name, distroseries2.name)
@@ -313,7 +313,7 @@
         db_branch2 = self.makeOfficialPackageBranch(
             distroseries=db_branch.distroseries)
 
-        new_distroseries = self.factory.makeDistroRelease(
+        new_distroseries = self.factory.makeDistroSeries(
             distribution=db_branch.distribution)
 
         brancher = DistroBrancher(

=== modified file 'lib/lp/registry/browser/tests/distributionsourcepackage-views.txt'
--- lib/lp/registry/browser/tests/distributionsourcepackage-views.txt	2010-12-03 08:56:44 +0000
+++ lib/lp/registry/browser/tests/distributionsourcepackage-views.txt	2011-08-03 16:08:31 +0000
@@ -43,14 +43,14 @@
     ...     date_uploaded=datetime(2010, 12, 30, tzinfo=pytz.UTC),
     ...     status=PackagePublishingStatus.PUBLISHED,
     ...     distroseries=ubuntutest.getSeries('breezy-autotest'))
-    >>> earliest_series = factory.makeDistroRelease(
+    >>> earliest_series = factory.makeDistroSeries(
     ...     distribution=ubuntutest, version='1.1', name='earliest')
     >>> eel_main_src_hist = publisher.getPubSource(
     ...     sourcename="eel", archive=ubuntutest.main_archive,
     ...     date_uploaded=datetime(2010, 12, 30, tzinfo=pytz.UTC),
     ...     status=PackagePublishingStatus.PUBLISHED,
     ...     distroseries=earliest_series)
-    >>> latest_series = factory.makeDistroRelease(
+    >>> latest_series = factory.makeDistroSeries(
     ...     distribution=ubuntutest, version='10.04', name='latest')
     >>> eel_main_src_hist = publisher.getPubSource(
     ...     sourcename="eel", archive=ubuntutest.main_archive,

=== modified file 'lib/lp/registry/browser/tests/distroseries-views.txt'
--- lib/lp/registry/browser/tests/distroseries-views.txt	2011-04-08 13:04:24 +0000
+++ lib/lp/registry/browser/tests/distroseries-views.txt	2011-08-03 16:08:31 +0000
@@ -182,7 +182,7 @@
 Series that belong to derivative distributions also contain the status field.
 
     >>> youbuntu = factory.makeDistribution(name='youbuntu')
-    >>> yo_series = factory.makeDistroRelease(name='melon')
+    >>> yo_series = factory.makeDistroSeries(name='melon')
     >>> yo_series.title = 'Melon'
     >>> youbuntu.full_functionality
     False

=== modified file 'lib/lp/registry/browser/tests/milestone-views.txt'
--- lib/lp/registry/browser/tests/milestone-views.txt	2011-06-23 13:10:40 +0000
+++ lib/lp/registry/browser/tests/milestone-views.txt	2011-08-03 16:08:31 +0000
@@ -577,7 +577,7 @@
 The driver of a series that belongs to an `IDerivativeDistribution` is a
 release manager and can create milestones.
 
-    >>> distroseries = factory.makeDistroRelease(name='pumpkin')
+    >>> distroseries = factory.makeDistroSeries(name='pumpkin')
     >>> driver = factory.makePerson(name='a-driver')
     >>> login_person(distroseries.distribution.owner)
     >>> distroseries.driver = driver

=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
--- lib/lp/registry/browser/tests/pillar-views.txt	2010-10-18 22:24:59 +0000
+++ lib/lp/registry/browser/tests/pillar-views.txt	2011-08-03 16:08:31 +0000
@@ -227,7 +227,7 @@
 
 DistroSeries can use this view. The distribution is used to set the links.
 
-    >>> series = factory.makeDistroRelease(distribution=distribution)
+    >>> series = factory.makeDistroSeries(distribution=distribution)
     >>> view = create_view(series, '+get-involved')
     >>> for link in view.enabled_links:
     ...     print link.name

=== modified file 'lib/lp/registry/browser/tests/productseries-views.txt'
--- lib/lp/registry/browser/tests/productseries-views.txt	2011-07-11 05:57:28 +0000
+++ lib/lp/registry/browser/tests/productseries-views.txt	2011-08-03 16:08:31 +0000
@@ -397,7 +397,7 @@
     ...     IPackagingUtil, PackagingType)
 
     >>> sourcepackagename = factory.makeSourcePackageName('sausage')
-    >>> distro_series = factory.makeDistroRelease()
+    >>> distro_series = factory.makeDistroSeries()
     >>> linked_series = factory.makeProductSeries(product=product)
     >>> packaging = getUtility(IPackagingUtil).createPackaging(
     ...     linked_series, sourcepackagename, distro_series,

=== modified file 'lib/lp/registry/browser/tests/sourcepackage-views.txt'
--- lib/lp/registry/browser/tests/sourcepackage-views.txt	2011-04-13 14:37:51 +0000
+++ lib/lp/registry/browser/tests/sourcepackage-views.txt	2011-08-03 16:08:31 +0000
@@ -9,8 +9,8 @@
     ...     name='crazy', product=product)
     >>> distribution = factory.makeDistribution(
     ...     name='youbuntu', displayname='Youbuntu')
-    >>> distroseries = factory.makeDistroRelease(name='busy',
-    ...     distribution=distribution)
+    >>> distroseries = factory.makeDistroSeries(
+    ...     name='busy', distribution=distribution)
     >>> sourcepackagename = factory.makeSourcePackageName(name='bonkers')
     >>> package = factory.makeSourcePackage(
     ...     sourcepackagename=sourcepackagename, distroseries=distroseries)
@@ -267,8 +267,8 @@
     >>> product = factory.makeProduct(name='stinky', displayname='Stinky')
     >>> productseries = factory.makeProductSeries(
     ...     name='stinkyseries', product=product)
-    >>> distroseries = factory.makeDistroRelease(name='wonky',
-    ...     distribution=distribution)
+    >>> distroseries = factory.makeDistroSeries(
+    ...     name='wonky', distribution=distribution)
     >>> sourcepackagename = factory.makeSourcePackageName(
     ...     name='stinkypackage')
     >>> package = factory.makeSourcePackage(

=== modified file 'lib/lp/registry/browser/tests/test_breadcrumbs.py'
--- lib/lp/registry/browser/tests/test_breadcrumbs.py	2011-05-27 21:12:25 +0000
+++ lib/lp/registry/browser/tests/test_breadcrumbs.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -20,7 +20,7 @@
         super(TestDistroseriesBreadcrumb, self).setUp()
         self.distribution = self.factory.makeDistribution(
             name='youbuntu', displayname='Youbuntu')
-        self.distroseries = self.factory.makeDistroRelease(
+        self.distroseries = self.factory.makeDistroSeries(
             name='groovy', version="1.06", distribution=self.distribution)
         self.distroseries_url = canonical_url(self.distroseries)
 

=== modified file 'lib/lp/registry/browser/tests/test_sourcepackage_views.py'
--- lib/lp/registry/browser/tests/test_sourcepackage_views.py	2011-04-07 20:40:29 +0000
+++ lib/lp/registry/browser/tests/test_sourcepackage_views.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for SourcePackage view code."""
@@ -58,7 +58,7 @@
         self.assertTrue((field, value) in params)
 
     def test_get_register_upstream_url_fields(self):
-        distroseries = self.factory.makeDistroRelease(
+        distroseries = self.factory.makeDistroSeries(
             distribution=self.factory.makeDistribution(name='zoobuntu'),
             name='walrus')
         source_package = self.factory.makeSourcePackage(
@@ -85,7 +85,7 @@
     def test_get_register_upstream_url_displayname(self):
         # The sourcepackagename 'python-super-package' is split on
         # the hyphens, and each word is capitalized.
-        distroseries = self.factory.makeDistroRelease(
+        distroseries = self.factory.makeDistroSeries(
             distribution=self.factory.makeDistribution(name='zoobuntu'),
             name='walrus')
         source_package = self.factory.makeSourcePackage(
@@ -159,7 +159,7 @@
         productseries = self.factory.makeProductSeries(name='1.0')
         self.milestone = self.factory.makeMilestone(
             product=productseries.product, productseries=productseries)
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.source_package = self.factory.makeSourcePackage(
             distroseries=distroseries, sourcepackagename='fnord')
         self.factory.makeSourcePackagePublishingHistory(

=== modified file 'lib/lp/registry/doc/distroseries.txt'
--- lib/lp/registry/doc/distroseries.txt	2011-06-25 14:39:47 +0000
+++ lib/lp/registry/doc/distroseries.txt	2011-08-03 16:08:31 +0000
@@ -480,7 +480,7 @@
 upstream.
 
     >>> distribution = factory.makeDistribution()
-    >>> distroseries = factory.makeDistroRelease(distribution=distribution)
+    >>> distroseries = factory.makeDistroSeries(distribution=distribution)
     >>> pkgs = distroseries.getMostRecentlyLinkedPackagings()
     >>> print pkgs.count()
     0

=== modified file 'lib/lp/registry/tests/test_distribution.py'
--- lib/lp/registry/tests/test_distribution.py	2011-07-21 12:50:02 +0000
+++ lib/lp/registry/tests/test_distribution.py	2011-08-03 16:08:31 +0000
@@ -207,7 +207,7 @@
         # When checking for the current release, we only care about the
         # version numbers. We don't care whether the version is
         # published in a earlier or later series.
-        self.current_series = self.factory.makeDistroRelease(
+        self.current_series = self.factory.makeDistroSeries(
             self.distribution, '1.0', status=SeriesStatus.CURRENT)
         self.publisher.getPubSource(
             version='0.9', distroseries=self.current_series)
@@ -296,9 +296,8 @@
     def test_derivatives(self):
         distro1 = self.factory.makeDistribution()
         distro2 = self.factory.makeDistribution()
-        previous_series = self.factory.makeDistroRelease(
-            distribution=distro1)
-        series = self.factory.makeDistroRelease(
+        previous_series = self.factory.makeDistroSeries(distribution=distro1)
+        series = self.factory.makeDistroSeries(
             distribution=distro2,
             previous_series=previous_series)
         self.assertContentEqual(

=== modified file 'lib/lp/registry/tests/test_distributionsourcepackage.py'
--- lib/lp/registry/tests/test_distributionsourcepackage.py	2011-03-09 13:40:58 +0000
+++ lib/lp/registry/tests/test_distributionsourcepackage.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for DistributionSourcePackage."""
@@ -68,7 +68,6 @@
             creator=self.person_nightly,
             status=PackagePublishingStatus.PUBLISHED)
 
-
         self.person_beta = self.factory.makePerson()
         self.gedit_beta_src_hist = self.publisher.getPubSource(
             sourcename="gedit", archive=self.archives['gedit-beta'],
@@ -135,7 +134,7 @@
         # IDistributionSourcePackage.development_version is the ISourcePackage
         # for the current series of the distribution.
         dsp = self.factory.makeDistributionSourcePackage()
-        series = self.factory.makeDistroRelease(distribution=dsp.distribution)
+        series = self.factory.makeDistroSeries(distribution=dsp.distribution)
         self.assertEqual(series, dsp.distribution.currentseries)
         development_version = dsp.distribution.currentseries.getSourcePackage(
             dsp.sourcepackagename)

=== modified file 'lib/lp/registry/tests/test_distro_webservice.py'
--- lib/lp/registry/tests/test_distro_webservice.py	2011-07-22 15:32:13 +0000
+++ lib/lp/registry/tests/test_distro_webservice.py	2011-08-03 16:08:31 +0000
@@ -5,9 +5,8 @@
 
 from datetime import datetime
 
+from launchpadlib.errors import Unauthorized
 import pytz
-from launchpadlib.errors import Unauthorized
-
 from zope.component import getUtility
 from zope.security.management import endInteraction
 from zope.security.proxy import removeSecurityProxy
@@ -52,8 +51,8 @@
     def setUp(self):
         super(TestGetBranchTips, self).setUp()
         self.distro = self.factory.makeDistribution()
-        series_1 = self.series_1 = self.factory.makeDistroRelease(self.distro)
-        series_2 = self.series_2 = self.factory.makeDistroRelease(self.distro)
+        series_1 = self.series_1 = self.factory.makeDistroSeries(self.distro)
+        series_2 = self.series_2 = self.factory.makeDistroSeries(self.distro)
         source_package = self.factory.makeSourcePackage(distroseries=series_1)
         branch = self.factory.makeBranch(sourcepackage=source_package)
         unofficial_branch = self.factory.makeBranch(
@@ -145,7 +144,7 @@
 
     def makeBranch(self, **kwargs):
         distro = self.factory.makeDistribution()
-        series = self.factory.makeDistroRelease(distro)
+        series = self.factory.makeDistroSeries(distro)
         source_package = self.factory.makeSourcePackage(distroseries=series)
         branch = self.factory.makeBranch(
             sourcepackage=source_package, private=True, **kwargs)

=== modified file 'lib/lp/registry/tests/test_packaging.py'
--- lib/lp/registry/tests/test_packaging.py	2011-06-20 14:13:33 +0000
+++ lib/lp/registry/tests/test_packaging.py	2011-08-03 16:08:31 +0000
@@ -26,9 +26,7 @@
     )
 from lp.registry.interfaces.product import IProductSet
 from lp.registry.interfaces.sourcepackagename import ISourcePackageNameSet
-from lp.registry.model.packaging import (
-    Packaging,
-    )
+from lp.registry.model.packaging import Packaging
 from lp.testing import (
     EventRecorder,
     login,
@@ -154,7 +152,7 @@
         TestCaseWithFactory.setUp(self)
         self.packaging_util = getUtility(IPackagingUtil)
         self.sourcepackagename = self.factory.makeSourcePackageName('sparkle')
-        self.distroseries = self.factory.makeDistroRelease(name='dazzle')
+        self.distroseries = self.factory.makeDistroSeries(name='dazzle')
         self.productseries = self.factory.makeProductSeries(name='glitter')
         self.owner = self.productseries.product.owner
 
@@ -206,7 +204,7 @@
             self.packaging_util.packagingEntryExists(
                 sourcepackagename=self.sourcepackagename,
                 distroseries=self.distroseries))
-        other_distroseries = self.factory.makeDistroRelease(name='shimmer')
+        other_distroseries = self.factory.makeDistroSeries(name='shimmer')
         self.assertFalse(
             self.packaging_util.packagingEntryExists(
                 sourcepackagename=self.sourcepackagename,

=== modified file 'lib/lp/registry/tests/test_person.py'
--- lib/lp/registry/tests/test_person.py	2011-07-29 06:29:13 +0000
+++ lib/lp/registry/tests/test_person.py	2011-08-03 16:08:31 +0000
@@ -389,7 +389,8 @@
         distribution = self.factory.makeDistribution()
         dsp2 = self.factory.makeDistributionSourcePackage(
             sourcepackagename='sp-a', distribution=distribution)
-        dsp3 = self.factory.makeDistributionSourcePackage(
+        # We don't reference dsp3 so it gets no name:
+        self.factory.makeDistributionSourcePackage(
             sourcepackagename='sp-c', distribution=distribution)
         with person_logged_in(user):
             dsp1.addSubscription(user, subscribed_by=user)
@@ -764,7 +765,8 @@
         team = reload_object(team)
         owner = reload_object(owner)
         self.person_set.delete(team, owner)
-        notifications = getUtility(IPersonNotificationSet).getNotificationsToSend()
+        notification_set = getUtility(IPersonNotificationSet)
+        notifications = notification_set.getNotificationsToSend()
         self.assertEqual(0, notifications.count())
 
     def test_openid_identifiers(self):
@@ -1037,12 +1039,12 @@
 
     def test_merge_with_distroseries_subscription(self):
         # See comments in assertSubscriptionMerges.
-        self.assertSubscriptionMerges(self.factory.makeDistroRelease())
+        self.assertSubscriptionMerges(self.factory.makeDistroSeries())
 
     def test_merge_with_conflicting_distroseries_subscription(self):
         # See comments in assertConflictingSubscriptionDeletes.
         self.assertConflictingSubscriptionDeletes(
-            self.factory.makeDistroRelease())
+            self.factory.makeDistroSeries())
 
     def test_merge_with_milestone_subscription(self):
         # See comments in assertSubscriptionMerges.

=== modified file 'lib/lp/registry/tests/test_sourcepackage.py'
--- lib/lp/registry/tests/test_sourcepackage.py	2011-06-15 16:37:10 +0000
+++ lib/lp/registry/tests/test_sourcepackage.py	2011-08-03 16:08:31 +0000
@@ -155,9 +155,9 @@
         # ISourcePackage.development_version gets the development version of
         # the source package.
         distribution = self.factory.makeDistribution()
-        dev_series = self.factory.makeDistroRelease(
+        dev_series = self.factory.makeDistroSeries(
             distribution=distribution, status=SeriesStatus.DEVELOPMENT)
-        other_series = self.factory.makeDistroRelease(
+        other_series = self.factory.makeDistroSeries(
             distribution=distribution, status=SeriesStatus.OBSOLETE)
         self.assertEqual(dev_series, distribution.currentseries)
         dev_sourcepackage = self.factory.makeSourcePackage(
@@ -544,7 +544,7 @@
                 "source packages.")
 
     def test_uploader_has_launchpad_edit_on_obsolete_series(self):
-        obsolete_series = self.factory.makeDistroRelease(
+        obsolete_series = self.factory.makeDistroSeries(
             status=SeriesStatus.OBSOLETE)
         sourcepackage = self.factory.makeSourcePackage(
             distroseries=obsolete_series)
@@ -559,7 +559,7 @@
                 "source packages in an OBSOLETE series.")
 
     def test_uploader_have_launchpad_edit_on_current_series(self):
-        current_series = self.factory.makeDistroRelease(
+        current_series = self.factory.makeDistroSeries(
             status=SeriesStatus.CURRENT)
         sourcepackage = self.factory.makeSourcePackage(
             distroseries=current_series)
@@ -574,7 +574,7 @@
                 "source packages in a CURRENT series.")
 
     def test_uploader_have_launchpad_edit_on_supported_series(self):
-        supported_series = self.factory.makeDistroRelease(
+        supported_series = self.factory.makeDistroSeries(
             status=SeriesStatus.SUPPORTED)
         sourcepackage = self.factory.makeSourcePackage(
             distroseries=supported_series)
@@ -627,8 +627,8 @@
 
         self.distribution = self.factory.makeDistribution(
             name='youbuntu', displayname='Youbuntu', owner=self.owner)
-        self.distroseries = self.factory.makeDistroRelease(name='busy',
-            distribution=self.distribution)
+        self.distroseries = self.factory.makeDistroSeries(
+            name='busy', distribution=self.distribution)
         self.sourcepackagename = self.factory.makeSourcePackageName(
             name='bonkers')
         self.package = self.factory.makeSourcePackage(

=== modified file 'lib/lp/registry/tests/test_suitesourcepackage.py'
--- lib/lp/registry/tests/test_suitesourcepackage.py	2010-08-20 20:31:18 +0000
+++ lib/lp/registry/tests/test_suitesourcepackage.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Tests for ISuiteSourcePackage."""
@@ -21,7 +21,7 @@
         # A SuiteSourcePackage is constructed from an `IDistroSeries`, a
         # `PackagePublishingPocket` enum and an `ISourcePackageName`. These
         # are all provided as attributes.
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         pocket = PackagePublishingPocket.RELEASE
         sourcepackagename = self.factory.makeSourcePackageName()
         ssp = SuiteSourcePackage(distroseries, pocket, sourcepackagename)

=== modified file 'lib/lp/soyuz/browser/tests/test_sourceslistentries.py'
--- lib/lp/soyuz/browser/tests/test_sourceslistentries.py	2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/browser/tests/test_sourceslistentries.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 # pylint: disable-msg=F0401
@@ -10,7 +10,6 @@
     'TestDefaultSelectedSeries',
     'TestOneDistroSeriesOnly',
     'TestSourcesListComment',
-    'test_suite',
     ]
 
 from canonical.launchpad.webapp.servers import LaunchpadTestRequest
@@ -32,9 +31,9 @@
         self.distribution = self.factory.makeDistribution(
             name='ibuntu', displayname="Ibuntu")
         self.series = [
-            self.factory.makeDistroRelease(name="feasty", version='9.04'),
-            self.factory.makeDistroRelease(name="getsy", version='10.09'),
-            self.factory.makeDistroRelease(name="ibix", version='11.04'),
+            self.factory.makeDistroSeries(name="feasty", version='9.04'),
+            self.factory.makeDistroSeries(name="getsy", version='10.09'),
+            self.factory.makeDistroSeries(name="ibix", version='11.04'),
         ]
         self.entries = SourcesListEntries(
             self.distribution, 'http://example.com/my/archive',
@@ -114,7 +113,7 @@
         TestCaseWithFactory.setUp(self)
         self.distribution = self.factory.makeDistribution(name='ibuntu')
         self.series = [
-            self.factory.makeDistroRelease(name="feasty", version='9.04'),
+            self.factory.makeDistroSeries(name="feasty", version='9.04'),
             ]
         self.entries = SourcesListEntries(
             self.distribution, 'http://example.com/my/archive',
@@ -146,7 +145,7 @@
 
         # Ensure there is only one series available.
         self.series = [
-            self.factory.makeDistroRelease(name="feasty", version='9.04'),
+            self.factory.makeDistroSeries(name="feasty", version='9.04'),
             ]
         self.entries = SourcesListEntries(
             self.distribution, 'http://example.com/my/archive',

=== modified file 'lib/lp/soyuz/tests/test_packageset.py'
--- lib/lp/soyuz/tests/test_packageset.py	2011-06-21 05:30:19 +0000
+++ lib/lp/soyuz/tests/test_packageset.py	2011-08-03 16:08:31 +0000
@@ -172,10 +172,10 @@
         self.distribution = getUtility(IDistributionSet).getByName(
             'ubuntu')
         self.distroseries_current = self.distribution.currentseries
-        self.distroseries_experimental = self.factory.makeDistroRelease(
+        self.distroseries_experimental = self.factory.makeDistroSeries(
             distribution=self.distribution, name="experimental",
             status=SeriesStatus.EXPERIMENTAL)
-        self.distroseries_experimental2 = self.factory.makeDistroRelease(
+        self.distroseries_experimental2 = self.factory.makeDistroSeries(
             distribution=self.distribution, name="experimental2",
             status=SeriesStatus.EXPERIMENTAL)
 

=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py	2011-06-08 11:06:04 +0000
+++ lib/lp/soyuz/tests/test_publishing.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test native publication workflow for Soyuz. """
@@ -43,9 +43,7 @@
     BinaryPackageFormat,
     PackageUploadStatus,
     )
-from lp.soyuz.interfaces.archive import (
-    IArchiveSet,
-    )
+from lp.soyuz.interfaces.archive import IArchiveSet
 from lp.soyuz.interfaces.archivearch import IArchiveArchSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageNameSet
 from lp.soyuz.interfaces.component import IComponentSet
@@ -65,8 +63,8 @@
     StormStatementRecorder,
     TestCaseWithFactory,
     )
+from lp.testing.factory import LaunchpadObjectFactory
 from lp.testing.matchers import HasQueryCount
-from lp.testing.factory import LaunchpadObjectFactory
 
 
 class SoyuzTestPublisher:
@@ -91,7 +89,7 @@
         :return: The `IDistroSeries` that got set as default.
         """
         if distroseries is None:
-            distroseries = self.factory.makeDistroRelease()
+            distroseries = self.factory.makeDistroSeries()
         self.distroseries = distroseries
         # Set up a person that has a GPG key.
         self.person = getUtility(IPersonSet).getByName('name16')
@@ -516,11 +514,11 @@
         if source_pub is None:
             distribution = self.factory.makeDistribution(
                 name='youbuntu', displayname='Youbuntu')
-            distroseries = self.factory.makeDistroRelease(name='busy',
-                distribution=distribution)
+            distroseries = self.factory.makeDistroSeries(
+                name='busy', distribution=distribution)
             source_package_name = self.factory.makeSourcePackageName(
                 name='bonkers')
-            source_package = self.factory.makeSourcePackage(
+            self.factory.makeSourcePackage(
                 sourcepackagename=source_package_name,
                 distroseries=distroseries)
             component = self.factory.makeComponent('multiverse')
@@ -542,7 +540,7 @@
                 binarypackagename=binary_package_name,
                 summary='summary for %s' % name,
                 build=build, component=source_pub.component)
-            bpph = self.factory.makeBinaryPackagePublishingHistory(
+            self.factory.makeBinaryPackagePublishingHistory(
                 binarypackagerelease=bpr, distroarchseries=das)
         return dict(
             distroseries=source_pub.distroseries,
@@ -863,7 +861,7 @@
         """
         test_archive = self.factory.makeArchive(
             distribution=self.test_publisher.ubuntutest,
-            purpose = ArchivePurpose.PPA)
+            purpose=ArchivePurpose.PPA)
         source = self.test_publisher.getPubSource(archive=test_archive)
         self.test_publisher.getPubBinaries(pub_source=source)
         return source
@@ -975,7 +973,8 @@
         # Test a PPA publication with ancestry
         ppa = self.factory.makeArchive(purpose=ArchivePurpose.PPA)
         spr = self.factory.makeSourcePackageRelease()
-        spph = self.factory.makeSourcePackagePublishingHistory(
+        # We don't reference the first spph so it doesn't get a name.
+        self.factory.makeSourcePackagePublishingHistory(
             sourcepackagerelease=spr, archive=ppa)
         spph2 = self.factory.makeSourcePackagePublishingHistory(
             sourcepackagerelease=spr, archive=ppa)
@@ -1380,13 +1379,14 @@
         """Publications in other series shouldn't be found."""
         bins = self.getPubBinaries(architecturespecific=False)
         series = self.factory.makeDistroSeries()
-        arch = self.factory.makeDistroArchSeries(
+        self.factory.makeDistroArchSeries(
             distroseries=series, architecturetag='i386')
         foreign_bins = bins[0].copyTo(
             series, bins[0].pocket, bins[0].archive)
         self.checkOtherPublications(bins[0], bins)
         self.checkOtherPublications(foreign_bins[0], foreign_bins)
 
+
 class TestSPPHModel(TestCaseWithFactory):
     """Test parts of the SourcePackagePublishingHistory model."""
 
@@ -1486,7 +1486,8 @@
         target_das_a = self.factory.makeDistroArchSeries()
         target_das_b = self.factory.makeDistroArchSeries(
             distroseries=target_das_a.distroseries)
-        target_das_c = self.factory.makeDistroArchSeries(
+        # We don't reference target_das_c so it doesn't get a name.
+        self.factory.makeDistroArchSeries(
             distroseries=target_das_a.distroseries, enabled=False)
         args = self.makeArgs([bpr], target_das_a.distroseries)
         bpphs = getUtility(IPublishingSet).publishBinaries(
@@ -1502,7 +1503,8 @@
         target_das = self.factory.makeDistroArchSeries()
         args = self.makeArgs([bpr], target_das.distroseries)
         [new_bpph] = getUtility(IPublishingSet).publishBinaries(**args)
-        [] = getUtility(IPublishingSet).publishBinaries(**args)
+        self.assertContentEqual(
+            [], getUtility(IPublishingSet).publishBinaries(**args))
 
         # But changing the target (eg. to RELEASE instead of BACKPORTS)
         # causes a new publication to be created.
@@ -1541,4 +1543,5 @@
 
         # A second copy does nothing, because it checks in the debug
         # archive too.
-        [] = getUtility(IPublishingSet).publishBinaries(**args)
+        self.assertContentEqual(
+            [], getUtility(IPublishingSet).publishBinaries(**args))

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2011-08-02 07:06:41 +0000
+++ lib/lp/testing/factory.py	2011-08-03 16:08:31 +0000
@@ -862,7 +862,7 @@
                 productseries = self.makeProductSeries(product=product)
             distroseries = None
         else:
-            distroseries = self.makeDistroRelease(distribution=distribution)
+            distroseries = self.makeDistroSeries(distribution=distribution)
         if name is None:
             name = self.getUniqueString()
         return ProxyFactory(
@@ -2357,11 +2357,11 @@
                 publish_copy_base_url)
         return distro
 
-    def makeDistroRelease(self, distribution=None, version=None,
-                          status=SeriesStatus.DEVELOPMENT,
-                          previous_series=None, name=None, displayname=None,
-                          registrant=None):
-        """Make a new distro release."""
+    def makeDistroSeries(self, distribution=None, version=None,
+                         status=SeriesStatus.DEVELOPMENT,
+                         previous_series=None, name=None, displayname=None,
+                         registrant=None):
+        """Make a new `DistroSeries`."""
         if distribution is None:
             distribution = self.makeDistribution()
         if name is None:
@@ -2387,19 +2387,15 @@
 
         return ProxyFactory(series)
 
-    def makeUbuntuDistroRelease(self, version=None,
-                                status=SeriesStatus.DEVELOPMENT,
-                                previous_series=None, name=None,
-                                displayname=None):
+    def makeUbuntuDistroSeries(self, version=None,
+                               status=SeriesStatus.DEVELOPMENT,
+                               previous_series=None, name=None,
+                               displayname=None):
         """Short cut to use the celebrity 'ubuntu' as the distribution."""
         ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
-        return self.makeDistroRelease(
+        return self.makeDistroSeries(
             ubuntu, version, status, previous_series, name, displayname)
 
-    # Most people think of distro releases as distro series.
-    makeDistroSeries = makeDistroRelease
-    makeUbuntuDistroSeries = makeUbuntuDistroRelease
-
     def makeDistroSeriesDifference(
         self, derived_series=None, source_package_name_str=None,
         versions=None,
@@ -2511,7 +2507,7 @@
         """Create a new distroarchseries"""
 
         if distroseries is None:
-            distroseries = self.makeDistroRelease()
+            distroseries = self.makeDistroSeries()
         if processorfamily is None:
             processorfamily = self.makeProcessorFamily()
         if owner is None:
@@ -2778,7 +2774,7 @@
         :param epoch_days: the time window to use when creating records.
         """
 
-        distroseries = self.makeDistroRelease()
+        distroseries = self.makeDistroSeries()
         sourcepackagename = self.makeSourcePackageName()
         sourcepackage = self.makeSourcePackage(
             sourcepackagename=sourcepackagename,
@@ -3373,7 +3369,7 @@
             sourcepackagename = self.getOrMakeSourcePackageName(
                 sourcepackagename)
         if distroseries is None:
-            distroseries = self.makeDistroRelease()
+            distroseries = self.makeDistroSeries()
         return distroseries.getSourcePackage(sourcepackagename)
 
     def getAnySourcePackageUrgency(self):
@@ -3498,7 +3494,7 @@
                     distribution = None
                 else:
                     distribution = archive.distribution
-                distroseries = self.makeDistroRelease(
+                distroseries = self.makeDistroSeries(
                     distribution=distribution)
 
         if archive is None:
@@ -3683,7 +3679,7 @@
                     distribution = None
                 else:
                     distribution = archive.distribution
-                distroseries = self.makeDistroRelease(
+                distroseries = self.makeDistroSeries(
                     distribution=distribution)
         if archive is None:
             archive = distroseries.main_archive
@@ -3889,7 +3885,7 @@
     def makeSuiteSourcePackage(self, distroseries=None,
                                sourcepackagename=None, pocket=None):
         if distroseries is None:
-            distroseries = self.makeDistroRelease()
+            distroseries = self.makeDistroSeries()
         if pocket is None:
             pocket = self.getAnyPocket()
         # Make sure we have a real sourcepackagename object.

=== modified file 'lib/lp/testing/tests/test_factory.py'
--- lib/lp/testing/tests/test_factory.py	2011-06-24 18:20:05 +0000
+++ lib/lp/testing/tests/test_factory.py	2011-08-03 16:08:31 +0000
@@ -375,17 +375,6 @@
         distribution = self.factory.makeDistribution()
         self.assertThat(distribution.displayname, StartsWith("Distribution"))
 
-    # makeDistroRelease
-    def test_makeDistroRelease_returns_IDistroSeries(self):
-        distroseries = self.factory.makeDistroRelease()
-        self.assertThat(
-            removeSecurityProxy(distroseries), Provides(IDistroSeries))
-
-    def test_makeDistroRelease_returns_proxy(self):
-        distroseries = self.factory.makeDistroRelease()
-        self.assertThat(distroseries, IsProxied())
-
-    # makeDistroSeries
     def test_makeDistroSeries_returns_IDistroSeries(self):
         distroseries = self.factory.makeDistroSeries()
         self.assertThat(

=== modified file 'lib/lp/translations/browser/tests/test_breadcrumbs.py'
--- lib/lp/translations/browser/tests/test_breadcrumbs.py	2010-09-02 14:32:25 +0000
+++ lib/lp/translations/browser/tests/test_breadcrumbs.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -53,7 +53,7 @@
     def test_distroseries(self):
         distribution = self.factory.makeDistribution(
             name='crumb-tester', displayname="Crumb Tester")
-        series = self.factory.makeDistroRelease(
+        series = self.factory.makeDistroSeries(
             name="test", version="1.0", distribution=distribution)
         self.assertBreadcrumbs(
             [("Crumb Tester", 'http://launchpad.dev/crumb-tester'),
@@ -110,7 +110,7 @@
     def test_distroserieslanguage(self):
         distribution = self.factory.makeDistribution(
             name='crumb-tester', displayname="Crumb Tester")
-        series = self.factory.makeDistroRelease(
+        series = self.factory.makeDistroSeries(
             name="test", version="1.0", distribution=distribution)
         naked_series = remove_security_proxy_and_shout_at_engineer(series)
         naked_series.hide_all_translations = False

=== modified file 'lib/lp/translations/browser/tests/test_distroserieslanguage_views.py'
--- lib/lp/translations/browser/tests/test_distroserieslanguage_views.py	2011-06-08 10:10:56 +0000
+++ lib/lp/translations/browser/tests/test_distroserieslanguage_views.py	2011-08-03 16:08:31 +0000
@@ -1,10 +1,8 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
 
-import unittest
-
 from lazr.restful.utils import get_current_browser_request
 from testtools.matchers import Equals
 import transaction
@@ -30,7 +28,7 @@
     def setUp(self):
         # Create a distroseries that uses translations.
         TestCaseWithFactory.setUp(self)
-        self.distroseries = self.factory.makeDistroRelease()
+        self.distroseries = self.factory.makeDistroSeries()
         self.distroseries.distribution.official_rosetta = True
         self.language = getUtility(ILanguageSet).getLanguageByCode('sr')
         sourcepackagename = self.factory.makeSourcePackageName()

=== modified file 'lib/lp/translations/browser/tests/translationimportqueue-views.txt'
--- lib/lp/translations/browser/tests/translationimportqueue-views.txt	2011-06-09 10:50:25 +0000
+++ lib/lp/translations/browser/tests/translationimportqueue-views.txt	2011-08-03 16:08:31 +0000
@@ -156,7 +156,7 @@
 
     >>> from lp.app.interfaces.launchpad import ILaunchpadCelebrities
     >>> ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
-    >>> ubuntuseries = factory.makeDistroRelease(ubuntu)
+    >>> ubuntuseries = factory.makeDistroSeries(ubuntu)
     >>> packagename = factory.makeSourcePackageName()
 
 We can upload to a sourcepackagename in the Ubuntu series.
@@ -201,7 +201,7 @@
 
 For non-Ubuntu distroseries, languagepack is not displayed.
 
-    >>> other_series = factory.makeDistroRelease()
+    >>> other_series = factory.makeDistroSeries()
     >>> other_entry = queue.addOrUpdateEntry(
     ...     'demo.pot', '# foo', True,
     ...     importer, distroseries=other_series,

=== modified file 'lib/lp/translations/doc/canonical_url_examples.txt'
--- lib/lp/translations/doc/canonical_url_examples.txt	2011-01-24 15:51:18 +0000
+++ lib/lp/translations/doc/canonical_url_examples.txt	2011-08-03 16:08:31 +0000
@@ -137,7 +137,7 @@
     >>> canonical_url(distribution)
     u'http://launchpad.dev/boo'
 
-    >>> distroseries = factory.makeDistroRelease(
+    >>> distroseries = factory.makeDistroSeries(
     ...     name='bah', distribution=distribution)
     >>> canonical_url(distroseries)
     u'http://launchpad.dev/boo/bah'

=== modified file 'lib/lp/translations/doc/distroseries-translations-copy.txt'
--- lib/lp/translations/doc/distroseries-translations-copy.txt	2011-05-14 15:04:20 +0000
+++ lib/lp/translations/doc/distroseries-translations-copy.txt	2011-08-03 16:08:31 +0000
@@ -8,8 +8,8 @@
 
     >>> login("foo.bar@xxxxxxxxxxxxx")
     >>> foobuntu = factory.makeDistribution('foobuntu', 'Foobuntu')
-    >>> barty = factory.makeDistroRelease(foobuntu, '99.0', name='barty')
-    >>> carty = factory.makeDistroRelease(
+    >>> barty = factory.makeDistroSeries(foobuntu, '99.0', name='barty')
+    >>> carty = factory.makeDistroSeries(
     ...     foobuntu, '99.1', name='carty', previous_series=barty)
 
 Functions to create source packages, templates and and translations.
@@ -174,7 +174,7 @@
 those translations. For testing purposes this series has translation imports
 enabled.
 
-    >>> darty = factory.makeDistroRelease(
+    >>> darty = factory.makeDistroSeries(
     ...     foobuntu, '99.2', name='darty', previous_series=barty)
     >>> darty_id = darty.id
     >>> darty.defer_translation_imports = False

=== modified file 'lib/lp/translations/scripts/tests/test_reupload_translations.py'
--- lib/lp/translations/scripts/tests/test_reupload_translations.py	2010-12-03 18:28:03 +0000
+++ lib/lp/translations/scripts/tests/test_reupload_translations.py	2011-08-03 16:08:31 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/python
 #
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test `reupload_translations` and `ReuploadPackageTranslations`."""
@@ -108,7 +108,7 @@
     def setUp(self):
         super(TestReuploadPackageTranslations, self).setUp()
         sourcepackagename = self.factory.makeSourcePackageName()
-        distroseries = self.factory.makeDistroRelease()
+        distroseries = self.factory.makeDistroSeries()
         self.sourcepackage = SourcePackage(sourcepackagename, distroseries)
         self.script = ReuploadPackageTranslations('reupload', test_args=[
             '-d', distroseries.distribution.name,
@@ -177,7 +177,7 @@
 
     def setUp(self):
         super(TestReuploadScript, self).setUp()
-        self.distroseries = self.factory.makeDistroRelease()
+        self.distroseries = self.factory.makeDistroSeries()
         self.sourcepackagename1 = self.factory.makeSourcePackageName()
         self.sourcepackagename2 = self.factory.makeSourcePackageName()
         transaction.commit()

=== modified file 'lib/lp/translations/scripts/tests/test_translations_import.py'
--- lib/lp/translations/scripts/tests/test_translations_import.py	2011-05-27 21:12:25 +0000
+++ lib/lp/translations/scripts/tests/test_translations_import.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 import logging
@@ -122,7 +122,7 @@
 
     def test_checkEntry_misapproved_package(self):
         package = self.factory.makeSourcePackage()
-        other_series = self.factory.makeDistroRelease(
+        other_series = self.factory.makeDistroSeries(
             distribution=package.distroseries.distribution)
         template = self.factory.makePOTemplate(
             distroseries=package.distroseries,

=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt'
--- lib/lp/translations/stories/productseries/xx-productseries-translations.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt	2011-08-03 16:08:31 +0000
@@ -314,7 +314,7 @@
 
     >>> login('admin@xxxxxxxxxxxxx')
     >>> distribution = factory.makeDistribution(name='earthian')
-    >>> distroseries = factory.makeDistroRelease(
+    >>> distroseries = factory.makeDistroSeries(
     ...     name='1.4', distribution=distribution)
     >>> logout()
     >>> print distribution.translation_focus
@@ -326,7 +326,7 @@
 If focus is set, nice explanatory text is displayed.
 
     >>> login('admin@xxxxxxxxxxxxx')
-    >>> focus_series = factory.makeDistroRelease(
+    >>> focus_series = factory.makeDistroSeries(
     ...     name='1.6', distribution=distribution)
     >>> distribution.translation_focus = focus_series
     >>> logout()

=== modified file 'lib/lp/translations/stories/standalone/custom-language-codes.txt'
--- lib/lp/translations/stories/standalone/custom-language-codes.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/translations/stories/standalone/custom-language-codes.txt	2011-08-03 16:08:31 +0000
@@ -205,13 +205,13 @@
     >>> from lp.registry.model.sourcepackagename import SourcePackageName
 
     >>> distro = factory.makeDistribution('distro')
-    >>> distroseries = factory.makeDistroRelease(distribution=distro)
+    >>> distroseries = factory.makeDistroSeries(distribution=distro)
     >>> sourcepackagename = SourcePackageName(name='bar')
     >>> package = factory.makeSourcePackage(
     ...     sourcepackagename=sourcepackagename, distroseries=distroseries)
     >>> naked_distro = removeSecurityProxy(distro)
     >>> naked_distro.translations_usage = ServiceUsage.LAUNCHPAD
-    >>> other_series = factory.makeDistroRelease(distribution=distro)
+    >>> other_series = factory.makeDistroSeries(distribution=distro)
     >>> template = factory.makePOTemplate(
     ...     distroseries=package.distroseries,
     ...     sourcepackagename=package.sourcepackagename)

=== modified file 'lib/lp/translations/stories/translations/xx-translations.txt'
--- lib/lp/translations/stories/translations/xx-translations.txt	2011-07-07 02:39:08 +0000
+++ lib/lp/translations/stories/translations/xx-translations.txt	2011-08-03 16:08:31 +0000
@@ -223,7 +223,7 @@
 
 == Links to filtered pages ==
 
-The DistroRelease per-language overview page shows different statistics:
+The DistroSeries per-language overview page shows different statistics:
 a count of untranslated messages, messages with new, unreviewed suggestions,
 and a count of messages which had their imported translations changed in
 Ubuntu.

=== modified file 'lib/lp/translations/tests/test_autoapproval.py'
--- lib/lp/translations/tests/test_autoapproval.py	2011-05-27 21:12:25 +0000
+++ lib/lp/translations/tests/test_autoapproval.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Unit tests for translation import queue auto-approval.
@@ -327,7 +327,7 @@
     def _setUpDistro(self):
         """Set up a `Distribution` with two templates."""
         self.distro = self.factory.makeDistribution()
-        self.distroseries = self.factory.makeDistroRelease(
+        self.distroseries = self.factory.makeDistroSeries(
             distribution=self.distro)
         self.packagename = SourcePackageNameSet().new('package')
         self.from_packagename = SourcePackageNameSet().new('from')
@@ -367,7 +367,7 @@
         # getPOTemplateByPathAndOrigin disregards templates from other
         # distroseries.
         self._setUpDistro()
-        other_series = self.factory.makeDistroRelease(
+        other_series = self.factory.makeDistroSeries(
             distribution=self.distro)
         self._makeTemplateForDistroSeries(other_series, 'test1')
         self.distrotemplate1.iscurrent = False
@@ -679,7 +679,7 @@
         super(TestKdePOFileGuess, self).setUp()
         self.queue = TranslationImportQueue()
 
-        self.distroseries = self.factory.makeDistroRelease()
+        self.distroseries = self.factory.makeDistroSeries()
 
         # For each of KDE3 and KDE4, set up:
         #  a translation package following that KDE's naming pattern,

=== modified file 'lib/lp/translations/tests/test_hastranslationtemplates.py'
--- lib/lp/translations/tests/test_hastranslationtemplates.py	2011-03-24 11:46:45 +0000
+++ lib/lp/translations/tests/test_hastranslationtemplates.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -102,7 +102,7 @@
         # If template is not current, nothing is returned even if
         # there are POFiles attached to it.
         template1.iscurrent = False
-        pofile = self.factory.makePOFile('sr', potemplate=template1)
+        self.factory.makePOFile('sr', potemplate=template1)
         current_translations = list(
             self.container.getCurrentTranslationFiles())
         self.assertEquals([], current_translations)
@@ -155,7 +155,7 @@
 
     def test_has_current_translation_templates__current_template(self):
         # A series with a current template has current templates.
-        template = self.createTranslationTemplate()
+        self.createTranslationTemplate()
         self.assertTrue(self.container.has_current_translation_templates)
 
     def test_has_current_translation_templates__noncurrent_template(self):
@@ -367,7 +367,7 @@
 
     def setUp(self):
         super(TestDistroSeriesHasTranslationTemplates, self).setUp()
-        self.container = self.factory.makeDistroRelease()
+        self.container = self.factory.makeDistroSeries()
 
     def test_has_sharing_translation_templates__templates(self):
         # This attribute is always False for DistroSeries

=== modified file 'lib/lp/translations/tests/test_pofile.py'
--- lib/lp/translations/tests/test_pofile.py	2011-06-22 10:22:42 +0000
+++ lib/lp/translations/tests/test_pofile.py	2011-08-03 16:08:31 +0000
@@ -1511,16 +1511,16 @@
         # (potemplates have the same name).
         distro = self.factory.makeDistribution()
         distro.translations_usage = ServiceUsage.LAUNCHPAD
-        series1 = self.factory.makeDistroRelease(distribution=distro,
-                                                 name='one')
+        series1 = self.factory.makeDistroSeries(
+            distribution=distro, name='one')
         sourcepackagename = self.factory.makeSourcePackageName()
         potemplate1 = self.factory.makePOTemplate(
             name='shared', distroseries=series1,
             sourcepackagename=sourcepackagename)
         pofile1 = self.factory.makePOFile('sr', potemplate=potemplate1)
 
-        series2 = self.factory.makeDistroRelease(distribution=distro,
-                                                 name='two')
+        series2 = self.factory.makeDistroSeries(
+            distribution=distro, name='two')
         potemplate2 = self.factory.makePOTemplate(
             name='shared', distroseries=series2,
             sourcepackagename=sourcepackagename)

=== modified file 'lib/lp/translations/tests/test_setcurrenttranslation.py'
--- lib/lp/translations/tests/test_setcurrenttranslation.py	2011-05-27 21:12:25 +0000
+++ lib/lp/translations/tests/test_setcurrenttranslation.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 # pylint: disable-msg=C0102
@@ -24,6 +24,7 @@
 #     /UpstreamImportIntoUbuntu/FixingIsImported
 #     /setCurrentTranslation#Execution%20matrix
 
+
 class SetCurrentTranslationTestMixin:
     """Tests for `POTMsgSet.setCurrentTranslation`.
 
@@ -1142,7 +1143,7 @@
         potemplate = self.factory.makePOTemplate(
             distroseries=ubuntu.currentseries,
             sourcepackagename=sourcepackagename)
-        sharing_series = self.factory.makeDistroRelease(distribution=ubuntu)
+        sharing_series = self.factory.makeDistroSeries(distribution=ubuntu)
         sharing_potemplate = self.factory.makePOTemplate(
             distroseries=sharing_series,
             sourcepackagename=sourcepackagename,

=== modified file 'lib/lp/translations/tests/test_translationimportqueue.py'
--- lib/lp/translations/tests/test_translationimportqueue.py	2011-07-26 12:05:21 +0000
+++ lib/lp/translations/tests/test_translationimportqueue.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 __metaclass__ = type
@@ -151,7 +151,7 @@
         self._setUpUbuntu()
         ubuntu_entry = self.queue.addOrUpdateEntry(
             'demo.pot', '#demo', False, self.uploaderperson,
-            distroseries=self.factory.makeDistroRelease(self.ubuntu),
+            distroseries=self.factory.makeDistroSeries(self.ubuntu),
             sourcepackagename=self.factory.makeSourcePackageName(),
             potemplate=self.potemplate)
         self._assertCanSetStatus(self.ubuntu_group_owner, ubuntu_entry,
@@ -232,7 +232,7 @@
         self.queue = getUtility(ITranslationImportQueue)
         self.factory = LaunchpadObjectFactory()
         self.distribution = self.factory.makeDistribution('boohoo')
-        self.distroseries = self.factory.makeDistroRelease(self.distribution)
+        self.distroseries = self.factory.makeDistroSeries(self.distribution)
         self.uploaderperson = self.factory.makePerson()
 
     def createSourcePackageAndPOTemplate(self, sourcepackagename, template):

=== modified file 'lib/lp/translations/tests/test_translations_to_review.py'
--- lib/lp/translations/tests/test_translations_to_review.py	2011-02-17 21:41:31 +0000
+++ lib/lp/translations/tests/test_translations_to_review.py	2011-08-03 16:08:31 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Test the choice of "translations to review" for a user."""
@@ -62,7 +62,7 @@
             self.productseries = None
             self.product = None
             self.distroseries = removeSecurityProxy(
-                self.factory.makeDistroRelease())
+                self.factory.makeDistroSeries())
             self.distribution = self.distroseries.distribution
             self.distribution.translation_focus = self.distroseries
             self.sourcepackagename = self.factory.makeSourcePackageName()