← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/product-factory-projectgroup into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/product-factory-projectgroup into lp:launchpad.

Commit message:
Rename factory.makeProduct(project=) to projectgroup=, anticipating a similar change to Product itself.

Requested reviews:
  Colin Watson (cjwatson)
Related bugs:
  Bug #523054 in Launchpad itself: "Rename Product.project to Product.projectgroup"
  https://bugs.launchpad.net/launchpad/+bug/523054

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/product-factory-projectgroup/+merge/247987

Rename factory.makeProduct(project=) to projectgroup=, anticipating a similar change to Product itself.

I've split this out because there's still quite a large volume of changes involved in this renaming, but this section only affects tests.
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/answers/tests/test_question.py'
--- lib/lp/answers/tests/test_question.py	2013-05-13 05:08:13 +0000
+++ lib/lp/answers/tests/test_question.py	2015-01-29 14:24:40 +0000
@@ -14,8 +14,8 @@
 
     def test_projectgroup_with_inactive_products_not_in_results(self):
         group = self.factory.makeProject()
-        product = self.factory.makeProduct(project=group)
-        inactive = self.factory.makeProduct(project=group)
+        product = self.factory.makeProduct(projectgroup=group)
+        inactive = self.factory.makeProduct(projectgroup=group)
         question = self.factory.makeQuestion(target=product)
         self.factory.makeQuestion(target=inactive)
         removeSecurityProxy(inactive).active = False

=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py	2014-01-04 18:45:58 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py	2015-01-29 14:24:40 +0000
@@ -450,23 +450,23 @@
             sprint, form, sprint.owner)
 
 
-class TestNewSpecificationFromProjectView(TestCaseWithFactory,
-                                          NewSpecificationTests):
+class TestNewSpecificationFromProjectGroupView(TestCaseWithFactory,
+                                               NewSpecificationTests):
 
     layer = DatabaseFunctionalLayer
 
     def createInitializedView(self):
-        project = self.factory.makeProject()
-        return create_initialized_view(project, '+addspec')
+        projectgroup = self.factory.makeProject()
+        return create_initialized_view(projectgroup, '+addspec')
 
     def test_allowed_info_type_validated(self):
         """information_type must be validated against context"""
-        project = self.factory.makeProject()
-        product = self.factory.makeProduct(project=project)
+        projectgroup = self.factory.makeProject()
+        product = self.factory.makeProduct(projectgroup=projectgroup)
         form = self._create_form_data(product.name)
         form['field.information_type'] = 'PROPRIETARY'
         self._assert_information_type_validation_error(
-            project, form, project.owner)
+            projectgroup, form, projectgroup.owner)
 
 
 class TestNewSpecificationFromProductView(TestCaseWithFactory,

=== modified file 'lib/lp/blueprints/browser/tests/test_specificationtarget.py'
--- lib/lp/blueprints/browser/tests/test_specificationtarget.py	2014-06-19 10:04:55 +0000
+++ lib/lp/blueprints/browser/tests/test_specificationtarget.py	2015-01-29 14:24:40 +0000
@@ -91,10 +91,10 @@
         self.verify_involvment(context)
 
     def test_adaptable_to_specificationtarget(self):
-        # A project should adapt to the products within to determine
+        # A project group should adapt to the products within to determine
         # involvment.
         context = self.factory.makeProject(name='hazelnut')
-        product = self.factory.makeProduct(project=context)
+        product = self.factory.makeProduct(projectgroup=context)
         naked_product = removeSecurityProxy(product)
         naked_product.blueprints_usage = ServiceUsage.LAUNCHPAD
         self.verify_involvment(context)
@@ -204,12 +204,12 @@
             context=distro_series)
 
     def test_projectgroup(self):
-        project = self.factory.makeProject()
-        product1 = self.factory.makeProduct(project=project)
-        self.factory.makeProduct(project=project)
+        projectgroup = self.factory.makeProject()
+        product1 = self.factory.makeProduct(projectgroup=projectgroup)
+        self.factory.makeProduct(projectgroup=projectgroup)
         self._test_templates_for_configuration(
             target=product1,
-            context=project)
+            context=projectgroup)
 
 
 class TestHasSpecificationsConfiguration(TestCaseWithFactory):

=== modified file 'lib/lp/blueprints/tests/test_hasspecifications.py'
--- lib/lp/blueprints/tests/test_hasspecifications.py	2013-08-19 06:43:04 +0000
+++ lib/lp/blueprints/tests/test_hasspecifications.py	2015-01-29 14:24:40 +0000
@@ -107,9 +107,9 @@
     def test_projectgroup_all_specifications(self):
         projectgroup = self.factory.makeProject()
         other_projectgroup = self.factory.makeProject()
-        product1 = self.factory.makeProduct(project=projectgroup)
-        product2 = self.factory.makeProduct(project=projectgroup)
-        product3 = self.factory.makeProduct(project=other_projectgroup)
+        product1 = self.factory.makeProduct(projectgroup=projectgroup)
+        product2 = self.factory.makeProduct(projectgroup=projectgroup)
+        product3 = self.factory.makeProduct(projectgroup=other_projectgroup)
         self.factory.makeSpecification(product=product1, name="spec1")
         self.factory.makeSpecification(
             product=product2, name="spec2",
@@ -121,9 +121,9 @@
     def test_projectgroup_valid_specifications(self):
         projectgroup = self.factory.makeProject()
         other_projectgroup = self.factory.makeProject()
-        product1 = self.factory.makeProduct(project=projectgroup)
-        product2 = self.factory.makeProduct(project=projectgroup)
-        product3 = self.factory.makeProduct(project=other_projectgroup)
+        product1 = self.factory.makeProduct(projectgroup=projectgroup)
+        product2 = self.factory.makeProduct(projectgroup=projectgroup)
+        product3 = self.factory.makeProduct(projectgroup=other_projectgroup)
         self.factory.makeSpecification(product=product1, name="spec1")
         self.factory.makeSpecification(
             product=product2, name="spec2",

=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py	2014-02-19 04:01:46 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py	2015-01-29 14:24:40 +0000
@@ -99,7 +99,7 @@
         # group has a customized bug filing confirmation message,
         # this message is displayed.
         project_group = self.factory.makeProject()
-        product = self.factory.makeProduct(project=project_group)
+        product = self.factory.makeProduct(projectgroup=project_group)
 
         # Without any customized bug filing confirmation message, the
         # default message is used.
@@ -130,7 +130,7 @@
         # group has a customized bug filing confirmation message,
         # this message is displayed.
         project_group = self.factory.makeProject()
-        product = self.factory.makeProduct(project=project_group)
+        product = self.factory.makeProduct(projectgroup=project_group)
         product_series = self.factory.makeProductSeries(product=product)
 
         # Without any customized bug filing confirmation message, the
@@ -825,7 +825,7 @@
         project_group = self.factory.makeProject()
         owner = project_group.owner
         product = self.factory.makeProduct(
-            owner=owner, name=product_name, project=project_group)
+            owner=owner, name=product_name, projectgroup=project_group)
         with person_logged_in(owner):
             product.official_malone = True
         form = {

=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_tags.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_tags.py	2014-02-19 04:01:46 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_tags.py	2015-01-29 14:24:40 +0000
@@ -14,20 +14,21 @@
 
     def setUp(self):
         super(TestBugTargetTags, self).setUp()
-        self.project = self.factory.makeProject()
-        self.target_product = self.factory.makeProduct(project=self.project)
+        self.project_group = self.factory.makeProject()
+        self.target_product = self.factory.makeProduct(
+            projectgroup=self.project_group)
 
     def test_no_tags(self):
         self.factory.makeBug(target=self.target_product)
         view = create_view(
-            self.project,
+            self.project_group,
             name="+bugtarget-portlet-tags-content")
         self.assertEqual([], [tag['tag'] for tag in view.tags_cloud_data])
 
     def test_tags(self):
         self.factory.makeBug(target=self.target_product, tags=['foo'])
         view = create_view(
-            self.project,
+            self.project_group,
             name="+bugtarget-portlet-tags-content")
         self.assertEqual(
             [u'foo'],
@@ -43,7 +44,7 @@
             self.factory.makeBug(
                 target=self.target_product, tags=['tag-first'])
         view = create_view(
-            self.project,
+            self.project_group,
             name="+bugtarget-portlet-tags-content")
         self.assertEqual(
             [u'tag-first', u'tag-middle', u'tag-last'],

=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py	2014-11-29 01:33:59 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py	2015-01-29 14:24:40 +0000
@@ -2518,7 +2518,7 @@
     def test_tag_urls_use_view_context(self):
         """urls contain the correct project group if target_context is None"""
         project_group = self.factory.makeProject()
-        product = self.factory.makeProduct(project=project_group)
+        product = self.factory.makeProduct(projectgroup=project_group)
         bug = self.factory.makeBug(target=product)
         with person_logged_in(bug.owner):
             bug.tags = ['foo']

=== modified file 'lib/lp/bugs/browser/tests/test_structuralsubscription.py'
--- lib/lp/bugs/browser/tests/test_structuralsubscription.py	2015-01-29 10:07:53 +0000
+++ lib/lp/bugs/browser/tests/test_structuralsubscription.py	2015-01-29 14:24:40 +0000
@@ -180,8 +180,8 @@
             self.target, name='+portlet-structural-subscribers')
 
     def setUpTarget(self):
-        project = self.factory.makeProject()
-        self.target = self.factory.makeProduct(project=project)
+        projectgroup = self.factory.makeProject()
+        self.target = self.factory.makeProduct(projectgroup=projectgroup)
 
     def test_target_label(self):
         # The target_label attribute of StructuralSubscribersPortletView

=== modified file 'lib/lp/bugs/tests/test_bugsearch_conjoined.py'
--- lib/lp/bugs/tests/test_bugsearch_conjoined.py	2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/tests/test_bugsearch_conjoined.py	2015-01-29 14:24:40 +0000
@@ -143,7 +143,7 @@
         self.bug_count = 2
         self.bug_products = {}
         for i in range(self.bug_count):
-            product = self.factory.makeProduct(project=self.projectgroup)
+            product = self.factory.makeProduct(projectgroup=self.projectgroup)
             product_milestone = self.factory.makeMilestone(
                 product=product, name='foo')
             bug = self.makeBug(product_milestone)
@@ -207,7 +207,7 @@
         for bug, product in self.bug_products.items():
             extra_bugtasks += 1
             other_product = self.factory.makeProduct(
-                project=self.projectgroup)
+                projectgroup=self.projectgroup)
             # Create a new milestone with the same name.
             other_product_milestone = self.factory.makeMilestone(
                 product=other_product,

=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
--- lib/lp/bugs/tests/test_structuralsubscription.py	2014-01-30 15:04:06 +0000
+++ lib/lp/bugs/tests/test_structuralsubscription.py	2015-01-29 14:24:40 +0000
@@ -464,7 +464,7 @@
 
     def makeBugTask(self):
         return self.factory.makeBugTask(
-            target=self.factory.makeProduct(project=self.target))
+            target=self.factory.makeProduct(projectgroup=self.target))
 
 
 class TestStructuralSubscriptionFiltersForProductSeries(
@@ -532,18 +532,18 @@
     def test_product_with_project_group(self):
         # get_structural_subscription_targets() will yield both a
         # product and its parent project group if it has one.
-        project = self.factory.makeProject()
+        projectgroup = self.factory.makeProject()
         product = self.factory.makeProduct(
-            project=project, owner=project.owner)
+            projectgroup=projectgroup, owner=projectgroup.owner)
         subscriber = self.factory.makePerson()
         with person_logged_in(subscriber):
-            project.addBugSubscription(subscriber, subscriber)
+            projectgroup.addBugSubscription(subscriber, subscriber)
         # This is a sanity check.
-        self.assertEqual(project, product.parent_subscription_target)
+        self.assertEqual(projectgroup, product.parent_subscription_target)
         bug = self.factory.makeBug(target=product)
         result = get_structural_subscription_targets(bug.bugtasks)
         self.assertEqual(
-            set([(bug.bugtasks[0], product), (bug.bugtasks[0], project)]),
+            set([(bug.bugtasks[0], product), (bug.bugtasks[0], projectgroup)]),
             set(result))
 
 
@@ -634,13 +634,13 @@
         # get_structural_subscriptions_for_bug() will return any
         # structural subscriptions from the parents of the targets of
         # that bug.
-        project = self.factory.makeProject()
+        projectgroup = self.factory.makeProject()
         product = self.factory.makeProduct(
-            project=project, owner=project.owner)
+            projectgroup=projectgroup, owner=projectgroup.owner)
         subscriber = self.factory.makePerson()
-        self_sub = project.addBugSubscription(subscriber, subscriber)
+        self_sub = projectgroup.addBugSubscription(subscriber, subscriber)
         # This is a sanity check.
-        self.assertEqual(project, product.parent_subscription_target)
+        self.assertEqual(projectgroup, product.parent_subscription_target)
         bug = self.factory.makeBug(target=product)
         subscriptions = get_structural_subscriptions_for_bug(
             bug, subscriber)

=== modified file 'lib/lp/bugs/tests/test_structuralsubscriptiontarget.py'
--- lib/lp/bugs/tests/test_structuralsubscriptiontarget.py	2015-01-29 10:07:53 +0000
+++ lib/lp/bugs/tests/test_structuralsubscriptiontarget.py	2015-01-29 14:24:40 +0000
@@ -385,13 +385,13 @@
             compile_storm(helper.join))
 
     def test_product_in_group(self):
-        project = self.factory.makeProject(owner=self.person)
-        target = self.factory.makeProduct(project=project)
+        projectgroup = self.factory.makeProject(owner=self.person)
+        target = self.factory.makeProduct(projectgroup=projectgroup)
         helper = IStructuralSubscriptionTargetHelper(target)
         self.assertThat(helper, Provides(IStructuralSubscriptionTargetHelper))
         self.assertEqual("project", helper.target_type_display)
         self.assertEqual(target, helper.target)
-        self.assertEqual(project, helper.target_parent)
+        self.assertEqual(projectgroup, helper.target_parent)
         self.assertEqual(target, helper.pillar)
         self.assertEqual({"product": target}, helper.target_arguments)
         self.assertEqual(
@@ -481,13 +481,13 @@
         # get_structural_subscriptions_for_target made against the
         # products in that group will return the group-level
         # subscription along with any subscriptions to the product.
-        project = self.factory.makeProject()
-        product = self.factory.makeProduct(project=project)
-        project_sub = project.addBugSubscription(
+        projectgroup = self.factory.makeProject()
+        product = self.factory.makeProduct(projectgroup=projectgroup)
+        projectgroup_sub = projectgroup.addBugSubscription(
             self.subscriber, self.subscriber)
         subscriptions = get_structural_subscriptions_for_target(
             product, self.subscriber)
-        self.assertEqual(set([project_sub]), set(subscriptions))
+        self.assertEqual(set([projectgroup_sub]), set(subscriptions))
 
 
 def distributionSourcePackageSetUp(test):

=== modified file 'lib/lp/code/browser/tests/test_branchlisting.py'
--- lib/lp/code/browser/tests/test_branchlisting.py	2014-12-08 00:32:30 +0000
+++ lib/lp/code/browser/tests/test_branchlisting.py	2015-01-29 14:24:40 +0000
@@ -710,15 +710,15 @@
 
     def setUp(self):
         super(TestProjectGroupBranches, self).setUp()
-        self.project = self.factory.makeProject()
+        self.projectgroup = self.factory.makeProject()
 
     def test_no_branches_gets_message_not_listing(self):
         # If there are no product branches on the project's products, then
         # the view shows the no code hosting message instead of a listing.
-        self.factory.makeProduct(project=self.project)
+        self.factory.makeProduct(projectgroup=self.projectgroup)
         view = create_initialized_view(
-            self.project, name='+branches', rootsite='code')
-        displayname = self.project.displayname
+            self.projectgroup, name='+branches', rootsite='code')
+        displayname = self.projectgroup.displayname
         expected_text = normalize_whitespace(
             ("Launchpad does not know where any of %s's "
              "projects host their code." % displayname))
@@ -727,25 +727,25 @@
         self.assertEqual(expected_text, text)
 
     def test_branches_get_listing(self):
-        # If a product has a branch, then the project view has a branch
-        # listing.
-        product = self.factory.makeProduct(project=self.project)
+        # If a product has a branch, then the project group view has a
+        # branch listing.
+        product = self.factory.makeProduct(projectgroup=self.projectgroup)
         self.factory.makeProductBranch(product=product)
         view = create_initialized_view(
-            self.project, name='+branches', rootsite='code')
+            self.projectgroup, name='+branches', rootsite='code')
         table = find_tag_by_id(view(), "branchtable")
         self.assertIsNot(None, table)
 
     def test_search_batch_request(self):
         # A search request with a 'batch_request' query parameter causes the
         # view to just render the next batch of results.
-        product = self.factory.makeProduct(project=self.project)
+        product = self.factory.makeProduct(projectgroup=self.projectgroup)
         self._test_search_batch_request(product, view_name='+all-branches')
 
     def test_ajax_batch_navigation_feature_flag(self):
         # The Javascript to wire up the ajax batch navigation behaviour is
         # correctly hidden behind a feature flag.
-        product = self.factory.makeProduct(project=self.project)
+        product = self.factory.makeProduct(projectgroup=self.projectgroup)
         for i in range(10):
             self.factory.makeProductBranch(product=product)
         self._test_ajax_batch_navigation_feature_flag(
@@ -753,10 +753,10 @@
 
     def test_non_batch_template(self):
         # The correct template is used for non batch requests.
-        product = self.factory.makeProduct(project=self.project)
+        product = self.factory.makeProduct(projectgroup=self.projectgroup)
         self._test_non_batch_template(product, 'buglisting-default.pt')
 
     def test_batch_template(self):
         # The correct template is used for batch requests.
-        product = self.factory.makeProduct(project=self.project)
+        product = self.factory.makeProduct(projectgroup=self.projectgroup)
         self._test_batch_template(product)

=== modified file 'lib/lp/code/model/tests/test_revision.py'
--- lib/lp/code/model/tests/test_revision.py	2015-01-07 00:35:41 +0000
+++ lib/lp/code/model/tests/test_revision.py	2015-01-29 14:24:40 +0000
@@ -351,7 +351,7 @@
 
 
 class GetPublicRevisionsTestCase(TestCaseWithFactory):
-    """A base class for the tests for people, products and projects."""
+    """A base class for the tests for people, products and project groups."""
 
     layer = DatabaseFunctionalLayer
 
@@ -524,13 +524,13 @@
 
     def setUp(self):
         GetPublicRevisionsTestCase.setUp(self)
-        self.project = self.factory.makeProject()
-        self.product = self.factory.makeProduct(project=self.project)
+        self.projectgroup = self.factory.makeProject()
+        self.product = self.factory.makeProduct(projectgroup=self.projectgroup)
 
     def _getRevisions(self, day_limit=30):
         # Returns the revisions for the person.
         return list(RevisionSet.getPublicRevisionsForProjectGroup(
-                self.project, day_limit))
+                self.projectgroup, day_limit))
 
     def testRevisionsMustBeInABranchOfProduct(self):
         # The revision must be in a branch for the product.
@@ -540,8 +540,10 @@
         self.assertEqual([rev1], self._getRevisions())
 
     def testProjectRevisions(self):
-        # Revisions in all products that are part of the project are returned.
-        another_product = self.factory.makeProduct(project=self.project)
+        # Revisions in all products that are part of the project group are
+        # returned.
+        another_product = self.factory.makeProduct(
+            projectgroup=self.projectgroup)
         rev1 = self._makeRevisionInBranch(product=self.product)
         rev2 = self._makeRevisionInBranch(product=another_product)
         self._makeRevisionInBranch()

=== modified file 'lib/lp/code/model/tests/test_revisioncache.py'
--- lib/lp/code/model/tests/test_revisioncache.py	2015-01-28 16:38:13 +0000
+++ lib/lp/code/model/tests/test_revisioncache.py	2015-01-29 14:24:40 +0000
@@ -191,8 +191,8 @@
         # Revisions across a project group can be determined using the
         # inProjectGroup method.
         projectgroup = self.factory.makeProject()
-        product1 = self.factory.makeProduct(project=projectgroup)
-        product2 = self.factory.makeProduct(project=projectgroup)
+        product1 = self.factory.makeProduct(projectgroup=projectgroup)
+        product2 = self.factory.makeProduct(projectgroup=projectgroup)
         rev1 = self.makeCachedRevision(product=product1)
         rev2 = self.makeCachedRevision(product=product2)
         # Make two other revisions, one in a different product, and another

=== modified file 'lib/lp/code/stories/feeds/xx-branch-atom.txt'
--- lib/lp/code/stories/feeds/xx-branch-atom.txt	2013-02-12 05:24:19 +0000
+++ lib/lp/code/stories/feeds/xx-branch-atom.txt	2015-01-29 14:24:40 +0000
@@ -22,11 +22,11 @@
     ...         owner=owner, date_created=date_generator.next())
     >>> mike = factory.makePerson(name='mike', displayname='Mike Murphy')
     >>> mary = factory.makePerson(name='mary', displayname='Mary Murphy')
-    >>> project = factory.makeProject(name='oh-man', displayname='Oh Man')
+    >>> projectgroup = factory.makeProject(name='oh-man', displayname='Oh Man')
     >>> product1 = factory.makeProduct(
-    ...     name='fooix', project=project, displayname="Fooix")
+    ...     name='fooix', projectgroup=projectgroup, displayname="Fooix")
     >>> product2 = factory.makeProduct(
-    ...     name='fooey', project=project, displayname="Fooey")
+    ...     name='fooey', projectgroup=projectgroup, displayname="Fooey")
     >>> make_branch(mike, product1, 'first')
     >>> make_branch(mike, product2, 'second')
     >>> make_branch(mike, product1, 'third')
@@ -162,10 +162,10 @@
     ...     "Feed <update> value is not the same as latest entry.")
 
 
-== Feed for a project's branches ==
+== Feed for a project group's branches ==
 
-The feed for a project's branches will show the most recent 25 branches
-which will include an entry for each branch.
+The feed for a project group's branches will show the most recent 25
+branches which will include an entry for each branch.
 
     >>> anon_browser.open('http://feeds.launchpad.dev/oh-man/branches.atom')
     >>> validate_browser_feed(anon_browser)

=== modified file 'lib/lp/code/stories/feeds/xx-revision-atom.txt'
--- lib/lp/code/stories/feeds/xx-revision-atom.txt	2012-04-10 14:01:17 +0000
+++ lib/lp/code/stories/feeds/xx-revision-atom.txt	2015-01-29 14:24:40 +0000
@@ -24,9 +24,9 @@
     ...    name='mary', displayname='Mary Murphy', email='mary@xxxxxxxxxxx')
     >>> fubar = factory.makeProject(name='fubar', displayname="Fubar")
     >>> fooix = factory.makeProduct(
-    ...     name='fooix', displayname="Fooix", project=fubar)
+    ...     name='fooix', displayname="Fooix", projectgroup=fubar)
     >>> fooey = factory.makeProduct(
-    ...     name='fooey', displayname="Fooey", project=fubar)
+    ...     name='fooey', displayname="Fooey", projectgroup=fubar)
     >>> fooix_branch = factory.makeProductBranch(
     ...     name='feature-x', product=fooix, owner=mike)
     >>> fooey_branch = factory.makeProductBranch(
@@ -139,10 +139,10 @@
     <link rel="self" href="http://feeds.launchpad.dev/fooix/revisions.atom"; />
 
 
-== Feed for a project's revisions ==
+== Feed for a project group's revisions ==
 
-A feed for a project will show the most recent 25 revisions across any
-branch for any product that is associated with the project.
+A feed for a project group will show the most recent 25 revisions across any
+branch for any product that is associated with the project group.
 
     >>> anon_browser.open('http://feeds.launchpad.dev/fubar/revisions.atom')
     >>> validate_browser_feed(anon_browser)
@@ -151,7 +151,7 @@
     [u'Latest Revisions for Fubar']
 
 Ignore the date associated with the id of 'fubar' as this is the date created
-of the project, which will be different each time the test is run.
+of the project group, which will be different each time the test is run.
 
     >>> print_parse_ids(anon_browser)
     <id>tag:launchpad.net,...:/code/fubar</id>

=== modified file 'lib/lp/code/stories/webservice/xx-branch.txt'
--- lib/lp/code/stories/webservice/xx-branch.txt	2012-08-08 07:23:58 +0000
+++ lib/lp/code/stories/webservice/xx-branch.txt	2015-01-29 14:24:40 +0000
@@ -232,9 +232,9 @@
 Branches are also accessible for a project group.
 
     >>> login('admin@xxxxxxxxxxxxx')
-    >>> project = factory.makeProject(name='widgets')
-    >>> fooix.project = project
-    >>> blob = factory.makeProduct(name='blob', project=project)
+    >>> projectgroup = factory.makeProject(name='widgets')
+    >>> fooix.project = projectgroup
+    >>> blob = factory.makeProduct(name='blob', projectgroup=projectgroup)
     >>> branch = factory.makeProductBranch(product=blob, name='bar')
     >>> branch.owner.name = 'mary'
     >>> logout()

=== modified file 'lib/lp/code/stories/webservice/xx-branchmergeproposal.txt'
--- lib/lp/code/stories/webservice/xx-branchmergeproposal.txt	2014-02-25 16:53:24 +0000
+++ lib/lp/code/stories/webservice/xx-branchmergeproposal.txt	2015-01-29 14:24:40 +0000
@@ -411,9 +411,9 @@
 the projects that are part of the project group.
 
     >>> login('admin@xxxxxxxxxxxxx')
-    >>> project = factory.makeProject(name='widgets')
-    >>> fooix.project = project
-    >>> blob = factory.makeProduct(name='blob', project=project)
+    >>> projectgroup = factory.makeProject(name='widgets')
+    >>> fooix.project = projectgroup
+    >>> blob = factory.makeProduct(name='blob', projectgroup=projectgroup)
     >>> proposal = factory.makeBranchMergeProposal(
     ...     product=blob, set_state=BranchMergeProposalStatus.NEEDS_REVIEW)
     >>> proposal.source_branch.owner.name = 'mary'

=== modified file 'lib/lp/code/tests/test_project.py'
--- lib/lp/code/tests/test_project.py	2012-01-01 02:58:52 +0000
+++ lib/lp/code/tests/test_project.py	2015-01-29 14:24:40 +0000
@@ -15,16 +15,16 @@
 
     def setUp(self):
         super(TestProjectBranches, self).setUp()
-        self.project = self.factory.makeProject()
-        self.product = self.factory.makeProduct(project=self.project)
+        self.projectgroup = self.factory.makeProject()
+        self.product = self.factory.makeProduct(projectgroup=self.projectgroup)
 
     def test_has_branches_with_no_branches(self):
-        # If there are no product branches on the project's products, then
-        # has branches returns False.
-        self.assertFalse(self.project.has_branches())
+        # If there are no product branches on the project group's products,
+        # then has_branches returns False.
+        self.assertFalse(self.projectgroup.has_branches())
 
     def test_has_branches_with_branches(self):
-        # If a product has a branch, then the product's project returns
-        # true for has_branches.
+        # If a product has a branch, then the product's project group
+        # returns true for has_branches.
         self.factory.makeProductBranch(product=self.product)
-        self.assertTrue(self.project.has_branches())
+        self.assertTrue(self.projectgroup.has_branches())

=== modified file 'lib/lp/registry/browser/tests/test_milestone.py'
--- lib/lp/registry/browser/tests/test_milestone.py	2014-06-19 06:38:53 +0000
+++ lib/lp/registry/browser/tests/test_milestone.py	2015-01-29 14:24:40 +0000
@@ -490,7 +490,7 @@
         # A ProjectGroup milestone doesn't exist unless one of its
         # Projects has a milestone of that name.
         product = self.factory.makeProduct(
-            owner=self.owner, project=self.project_group)
+            owner=self.owner, projectgroup=self.project_group)
         self.product_milestone = self.factory.makeMilestone(
             productseries=product.development_focus,
             name=self.milestone_name)
@@ -605,7 +605,7 @@
         self.product = self.factory.makeProduct(
             name="product1",
             owner=self.owner,
-            project=self.project_group)
+            projectgroup=self.project_group)
         self.milestone = self.factory.makeMilestone(product=self.product)
         with person_logged_in(self.owner):
             self.milestone.setTags(self.tags, self.owner)

=== modified file 'lib/lp/registry/browser/tests/test_projectgroup.py'
--- lib/lp/registry/browser/tests/test_projectgroup.py	2013-02-07 06:10:38 +0000
+++ lib/lp/registry/browser/tests/test_projectgroup.py	2015-01-29 14:24:40 +0000
@@ -62,7 +62,7 @@
         owner = self.factory.makePerson()
         product = self.factory.makeProduct(
             information_type=InformationType.PROPRIETARY,
-            project=self.project_group, owner=owner)
+            projectgroup=self.project_group, owner=owner)
         owner_browser = self.getViewBrowser(self.project_group,
                                             user=owner)
         with person_logged_in(owner):
@@ -77,11 +77,11 @@
         owner = self.factory.makePerson()
         public_product = self.factory.makeProduct(
             information_type=InformationType.PUBLIC,
-            project=self.project_group, owner=owner)
+            projectgroup=self.project_group, owner=owner)
         public_milestone = self.factory.makeMilestone(product=public_product)
         product = self.factory.makeProduct(
             information_type=InformationType.PROPRIETARY,
-            project=self.project_group, owner=owner)
+            projectgroup=self.project_group, owner=owner)
         milestone = self.factory.makeMilestone(product=product,
                                                name=public_milestone.name)
         (group_milestone,) = self.project_group.milestones
@@ -109,10 +109,10 @@
             owning_team.addMember(teammember, owner)
         group = self.factory.makeProject(owner=owning_team)
         private = self.factory.makeProduct(
-            project=group, owner=owner,
+            projectgroup=group, owner=owner,
             information_type=InformationType.PROPRIETARY, name='private')
         public = self.factory.makeProduct(
-            project=group, owner=owner, name='public')
+            projectgroup=group, owner=owner, name='public')
         private_milestone = self.factory.makeMilestone(
             product=private, name='1.0')
         public_milestone = self.factory.makeMilestone(
@@ -203,19 +203,22 @@
         # Information type controls are provided when creating a project via a
         # project group.
         form = make_product_form(action=1)
-        project = self.factory.makeProject()
-        with person_logged_in(project.owner):
-            view = create_initialized_view(project, '+newproduct', form=form)
+        projectgroup = self.factory.makeProject()
+        with person_logged_in(projectgroup.owner):
+            view = create_initialized_view(
+                projectgroup, '+newproduct', form=form)
         self.assertIn('information_type_data',
                       IJSONRequestCache(view.request).objects)
         self.assertIsNot(None, view.view.form_fields.get('information_type'))
 
     def test_information_type_saved(self):
         # Setting information_type to PROPRIETARY via form actually works.
-        project = self.factory.makeProject()
-        form = make_product_form(project.owner, action=2, proprietary=True)
-        with person_logged_in(project.owner):
-            view = create_initialized_view(project, '+newproduct', form=form)
+        projectgroup = self.factory.makeProject()
+        form = make_product_form(
+            projectgroup.owner, action=2, proprietary=True)
+        with person_logged_in(projectgroup.owner):
+            view = create_initialized_view(
+                projectgroup, '+newproduct', form=form)
         self.assertEqual(0, len(view.view.errors))
         product = getUtility(IProductSet).getByName(form['field.name'])
         self.assertEqual(InformationType.PROPRIETARY, product.information_type)

=== modified file 'lib/lp/registry/browser/tests/test_subscription_links.py'
--- lib/lp/registry/browser/tests/test_subscription_links.py	2012-10-05 17:18:52 +0000
+++ lib/lp/registry/browser/tests/test_subscription_links.py	2015-01-29 14:24:40 +0000
@@ -146,7 +146,7 @@
         super(ProjectGroupView, self).setUp()
         self.target = self.factory.makeProject()
         self.factory.makeProduct(
-            project=self.target, official_malone=True)
+            projectgroup=self.target, official_malone=True)
 
 
 class ProjectGroupMilestone(TestCaseWithFactory):
@@ -162,11 +162,11 @@
             # an OOPS because adapting the milestone to
             # IStructuralSubscriptionTargetHelper would attempt to look them
             # up in the database, raising an exception.
-            project = self.factory.makeProject()
-            product = self.factory.makeProduct(project=project)
+            projectgroup = self.factory.makeProject()
+            product = self.factory.makeProduct(projectgroup=projectgroup)
             mixin = StructuralSubscriptionMenuMixin()
             mixin.context = ProjectMilestone(
-                project, '11.04', None, True, product)
+                projectgroup, '11.04', None, True, product)
             # Before bug 778689 was fixed, this would raise an exception.
             mixin._enabled
 
@@ -451,10 +451,11 @@
     def test_subscribe_link_no_bugtracker_parent_bugtracker(self):
         # If there is no bugtracker, do not render links, even if the
         # parent has a bugtracker (see bug 770287).
-        project = self.factory.makeProject()
+        projectgroup = self.factory.makeProject()
         with person_logged_in(self.target.owner):
-            self.target.project = project
-        self.factory.makeProduct(project=project, official_malone=True)
+            self.target.projectgroup = projectgroup
+        self.factory.makeProduct(
+            projectgroup=projectgroup, official_malone=True)
         self._create_scenario(self.regular_user)
         self.assertLinksMissing()
 
@@ -476,7 +477,7 @@
         super(ProjectGroupDoesNotUseLPView, self).setUp()
         self.target = self.factory.makeProject()
         self.factory.makeProduct(
-            project=self.target, official_malone=False)
+            projectgroup=self.target, official_malone=False)
 
 
 class ProjectGroupDoesNotUseLPBugs(ProductDoesNotUseLPBugs):
@@ -489,7 +490,7 @@
         super(ProjectGroupDoesNotUseLPBugs, self).setUp()
         self.target = self.factory.makeProject()
         self.factory.makeProduct(
-            project=self.target, official_malone=False)
+            projectgroup=self.target, official_malone=False)
 
     test_subscribe_link_no_bugtracker_parent_bugtracker = None
 

=== modified file 'lib/lp/registry/doc/productseries.txt'
--- lib/lp/registry/doc/productseries.txt	2013-05-01 21:23:16 +0000
+++ lib/lp/registry/doc/productseries.txt	2015-01-29 14:24:40 +0000
@@ -332,8 +332,8 @@
 
 == Drivers ==
 
-Products, projects and product series have drivers, who are people that
-have permission to approve bugs and features for specific releases. The
+Products, project groups and product series have drivers, who are people
+that have permission to approve bugs and features for specific releases. The
 rules are that:
 
  1. a "driver" can be set on either ProjectGroup, Product or ProductSeries
@@ -343,19 +343,20 @@
 
  3. the important attribute is ".drivers" on a productseries, it is
     calculated based on the combination of owners and drivers in the
-    series, product and project. It is a LIST of drivers, which might be
-    empty, or have one, two or three people/teams in it.
+    series, product and project group. It is a LIST of drivers, which might
+    be empty, or have one, two or three people/teams in it.
 
  4. the list includes the explicitly set drivers from series, product
-    and project
+    and project group
 
  5. if there are no explicitly set drivers, then:
-      - if there is a project, then the list is the project.owner
-      - if there is no project, then the list is the product.owner in
+      - if there is a project group, then the list is the projectgroup.owner
+      - if there is no project group, then the list is the product.owner in
     other words, we use the "highest" owner as the fallback, which is
-    either the product owner or the project owner if there is a project.
+    either the product owner or the project group owner if there is a
+    project group.
 
-We test these rules below. We will create the project, product and
+We test these rules below. We will create the project group, product and
 series directly so that we don't have to deal with security permissions
 checks when setting and resetting the driver attributes.
 
@@ -365,13 +366,13 @@
     >>> mark = getUtility(IPersonSet).getByName('mark')
     >>> jblack = getUtility(IPersonSet).getByName('jblack')
 
-    >>> project = factory.makeProject(name='testproj',
+    >>> projectgroup = factory.makeProject(name='testproj',
     ...     displayname='Test Project',
     ...     title='Test Project Title', homepageurl='http://foo.com/url',
     ...     summary='summary', description='description', owner=carlos)
     >>> product = factory.makeProduct(owner=mark, name='testprod',
     ...     displayname='Test Product', title='Test product title',
-    ...     summary='summary', project=project)
+    ...     summary='summary', projectgroup=projectgroup)
     >>> series = factory.makeProductSeries(owner=jblack, name='1.0', product=product,
     ...     summary='Series summary')
 
@@ -379,7 +380,8 @@
 First, lets see what we get for the series drivers before we have
 anything actually set.
 
-If there is a project on the product, we would expect the project owner:
+If there is a project group on the product, we would expect the project
+group owner:
 
     >>> print series.product.project.name
     testproj
@@ -387,16 +389,17 @@
     ...     print d.name
     carlos
 
-If there is NO project on the product, then we expect the product owner:
+If there is NO project group on the product, then we expect the product
+owner:
 
     >>> product.project = None
     >>> for d in series.drivers:
     ...     print d.name
     mark
 
-Now lets put the project back:
+Now let's put the project group back:
 
-    >>> product.project = project.id
+    >>> product.project = projectgroup.id
     >>> flush_database_updates()
 
 Edgar and cprov will be the drivers.
@@ -407,7 +410,7 @@
 Edgar becomes the driver of the project group and thus also drives the
 series.
 
-    >>> project.driver = edgar
+    >>> projectgroup.driver = edgar
     >>> for d in series.drivers:
     ...     print d.name
     edgar
@@ -423,7 +426,7 @@
 With just a driver on the series, the owner of the project group is reported
 as driver, too.
 
-    >>> project.driver = None
+    >>> projectgroup.driver = None
     >>> for d in series.drivers:
     ...     print d.name
     carlos

=== modified file 'lib/lp/registry/tests/test_milestone.py'
--- lib/lp/registry/tests/test_milestone.py	2014-06-12 01:44:41 +0000
+++ lib/lp/registry/tests/test_milestone.py	2015-01-29 14:24:40 +0000
@@ -530,12 +530,11 @@
         self.assertContentEqual([spec],
                                 target_milestone.getSpecifications(None))
 
-    def test_milestones_on_project(self):
-        # A Project (Project Group) milestone contains all specifications
-        # targetted to contained Products (Projects) for milestones of
-        # a certain name.
+    def test_milestones_on_project_group(self):
+        # A Project Group milestone contains all specifications targetted to
+        # contained Projects for milestones of a certain name.
         projectgroup = self.factory.makeProject()
-        product = self.factory.makeProduct(project=projectgroup)
+        product = self.factory.makeProduct(projectgroup=projectgroup)
         spec, target_milestone = self._create_milestones_on_target(
             product=product)
         milestone = projectgroup.getMilestone(name=target_milestone.name)
@@ -544,11 +543,11 @@
     def makeMixedMilestone(self):
         projectgroup = self.factory.makeProject()
         owner = self.factory.makePerson()
-        public_product = self.factory.makeProduct(project=projectgroup)
+        public_product = self.factory.makeProduct(projectgroup=projectgroup)
         public_milestone = self.factory.makeMilestone(product=public_product)
         product = self.factory.makeProduct(
             owner=owner, information_type=InformationType.PROPRIETARY,
-            project=projectgroup)
+            projectgroup=projectgroup)
         target_milestone = self.factory.makeMilestone(
             product=product, name=public_milestone.name)
         milestone = projectgroup.getMilestone(name=public_milestone.name)
@@ -623,12 +622,12 @@
     def setUp(self):
         super(ProjectMilestoneSecurityAdaperTestCase, self).setUp()
         project_group = self.factory.makeProject()
-        public_product = self.factory.makeProduct(project=project_group)
+        public_product = self.factory.makeProduct(projectgroup=project_group)
         self.factory.makeMilestone(
             product=public_product, name='public-milestone')
         self.proprietary_product_owner = self.factory.makePerson()
         self.proprietary_product = self.factory.makeProduct(
-            project=project_group,
+            projectgroup=project_group,
             owner=self.proprietary_product_owner,
             information_type=InformationType.PROPRIETARY)
         self.factory.makeMilestone(

=== modified file 'lib/lp/registry/tests/test_milestone_vocabularies.py'
--- lib/lp/registry/tests/test_milestone_vocabularies.py	2014-01-07 14:02:51 +0000
+++ lib/lp/registry/tests/test_milestone_vocabularies.py	2015-01-29 14:24:40 +0000
@@ -35,8 +35,8 @@
         # associated private product.
         owner = self.factory.makePerson()
         group = self.factory.makeProject(owner=owner)
-        public = self.factory.makeProduct(project=group, owner=owner)
-        private = self.factory.makeProduct(project=group, owner=owner,
+        public = self.factory.makeProduct(projectgroup=group, owner=owner)
+        private = self.factory.makeProduct(projectgroup=group, owner=owner,
             information_type=InformationType.PROPRIETARY)
         with person_logged_in(owner):
             m1 = self.factory.makeMilestone(name='public', product=public)
@@ -67,8 +67,8 @@
         self.assertEqual(
             [term.title for term in vocabulary], [u'Mozilla Firefox 1.0'])
 
-    def testProjectMilestoneVocabulary(self):
-        """Test of MilestoneVocabulary for a project."""
+    def testProjectGroupMilestoneVocabulary(self):
+        """Test of MilestoneVocabulary for a project group."""
         mozilla = getUtility(IProjectGroupSet).getByName('mozilla')
         vocabulary = MilestoneVocabulary(mozilla)
         self.assertEqual(

=== modified file 'lib/lp/registry/tests/test_milestonetag.py'
--- lib/lp/registry/tests/test_milestonetag.py	2013-03-25 05:53:38 +0000
+++ lib/lp/registry/tests/test_milestonetag.py	2015-01-29 14:24:40 +0000
@@ -107,7 +107,7 @@
         self.product = self.factory.makeProduct(
             name="product1",
             owner=self.owner,
-            project=self.project_group)
+            projectgroup=self.project_group)
         self.milestone = self.factory.makeMilestone(product=self.product)
 
     def _create_bugtasks(self, num, milestone=None):

=== modified file 'lib/lp/registry/tests/test_pillaraffiliation.py'
--- lib/lp/registry/tests/test_pillaraffiliation.py	2012-10-09 10:28:02 +0000
+++ lib/lp/registry/tests/test_pillaraffiliation.py	2015-01-29 14:24:40 +0000
@@ -110,8 +110,9 @@
     def test_product_group_driver_affiliation(self):
         # A person who is the driver for a product's group is affiliated.
         person = self.factory.makePerson()
-        project = self.factory.makeProject(driver=person)
-        product = self.factory.makeProduct(project=project, name='pting')
+        projectgroup = self.factory.makeProject(driver=person)
+        product = self.factory.makeProduct(
+            projectgroup=projectgroup, name='pting')
         self._check_affiliated_with_product(person, product, 'driver')
 
     def test_no_product_bug_supervisor_affiliation(self):
@@ -400,9 +401,9 @@
         # affiliated. Here, the affiliation is with the product.
         owner = self.factory.makePerson()
         driver = self.factory.makePerson()
-        project = self.factory.makeProject(driver=driver)
+        projectgroup = self.factory.makeProject(driver=driver)
         product = self.factory.makeProduct(
-            owner=owner, project=project, name='pting')
+            owner=owner, projectgroup=projectgroup, name='pting')
         productseries = self.factory.makeProductSeries(
             owner=owner, product=product)
         [badges] = (

=== modified file 'lib/lp/registry/tests/test_productseries.py'
--- lib/lp/registry/tests/test_productseries.py	2013-08-19 06:43:04 +0000
+++ lib/lp/registry/tests/test_productseries.py	2015-01-29 14:24:40 +0000
@@ -358,7 +358,7 @@
             self.projectgroup = self.factory.makeProject()
         else:
             self.projectgroup = None
-        self.product = self.factory.makeProduct(project=self.projectgroup)
+        self.product = self.factory.makeProduct(projectgroup=self.projectgroup)
         self.series = self.product.getSeries('trunk')
 
     def test_drivers_nodrivers_group(self):

=== modified file 'lib/lp/registry/tests/test_projectgroup.py'
--- lib/lp/registry/tests/test_projectgroup.py	2014-01-30 15:04:06 +0000
+++ lib/lp/registry/tests/test_projectgroup.py	2015-01-29 14:24:40 +0000
@@ -58,7 +58,7 @@
         project_group = removeSecurityProxy(self.factory.makeProject())
         owner = self.factory.makePerson()
         product = self.factory.makeProduct(
-            project=project_group, owner=owner,
+            projectgroup=project_group, owner=owner,
             information_type=InformationType.PROPRIETARY)
         self.assertNotIn(product, project_group.getProducts(None))
         outsider = self.factory.makePerson()
@@ -73,83 +73,83 @@
     def setUp(self):
         super(ProjectGroupSearchTestCase, self).setUp()
         self.person = self.factory.makePerson()
-        self.project1 = self.factory.makeProject(
+        self.projectgroup1 = self.factory.makeProject(
             name="zazzle", owner=self.person)
-        self.project2 = self.factory.makeProject(
+        self.projectgroup2 = self.factory.makeProject(
             name="zazzle-dazzle", owner=self.person)
-        self.project3 = self.factory.makeProject(
+        self.projectgroup3 = self.factory.makeProject(
             name="razzle-dazzle", owner=self.person,
             description="Giving 110% at all times.")
-        self.projectset = getUtility(IProjectGroupSet)
+        self.projectgroupset = getUtility(IProjectGroupSet)
         login_person(self.person)
 
     def testSearchNoMatch(self):
         # Search for a string that does not exist.
-        results = self.projectset.search(
+        results = self.projectgroupset.search(
             text="Fuzzle", search_products=False)
         self.assertEqual(0, results.count())
 
     def testSearchMatch(self):
         # Search for a matching string.
-        results = self.projectset.search(
+        results = self.projectgroupset.search(
             text="zazzle", search_products=False)
         self.assertEqual(2, results.count())
-        expected = sorted([self.project1, self.project2])
+        expected = sorted([self.projectgroup1, self.projectgroup2])
         self.assertEqual(expected, sorted(results))
 
     def testSearchDifferingCaseMatch(self):
         # Search for a matching string with a different case.
-        results = self.projectset.search(
+        results = self.projectgroupset.search(
             text="Zazzle", search_products=False)
         self.assertEqual(2, results.count())
-        expected = sorted([self.project1, self.project2])
+        expected = sorted([self.projectgroup1, self.projectgroup2])
         self.assertEqual(expected, sorted(results))
 
     def testProductSearchNoMatch(self):
-        # Search for only project even if a product matches.
+        # Search for only project group even if a product matches.
         product = self.factory.makeProduct(
             name="zazzle-product",
             title="Hoozah",
             owner=self.person)
-        product.project = self.project1
-        results = self.projectset.search(
+        product.projectgroup = self.projectgroup1
+        results = self.projectgroupset.search(
             text="Hoozah", search_products=False)
         self.assertEqual(0, results.count())
 
     def testProductSearchMatch(self):
-        # Search for products belonging to a project.  Note the project is
-        # returned.
+        # Search for products belonging to a project group.  Note the
+        # project group is returned.
         product = self.factory.makeProduct(
             name="zazzle-product",
             title="Hoozah",
             owner=self.person)
-        product.project = self.project1
-        results = self.projectset.search(
+        product.projectgroup = self.projectgroup1
+        results = self.projectgroupset.search(
             text="Hoozah", search_products=True)
         self.assertEqual(1, results.count())
-        self.assertEqual(self.project1, results[0])
+        self.assertEqual(self.projectgroup1, results[0])
 
     def testProductSearchMatchOnProject(self):
         # Use the 'search_products' option but only look for a matching
         # project group to demonstrate projects are NOT searched too.
 
         # XXX: BradCrittenden 2009-11-10 bug=479984:
-        # The behaviour is currently unintuitive when search_products is used.
-        # An exact match on a project is not returned since only products are
-        # searched and the corresponding project for those matched is
-        # returned.  This test demonstrates the current wrong behaviour and
-        # needs to be fixed when the search is fixed.
-        results = self.projectset.search(
+        # The behaviour is currently unintuitive when search_products is
+        # used.  An exact match on a project group is not returned since
+        # only products are searched and the corresponding project group for
+        # those matched is returned.  This test demonstrates the current
+        # wrong behaviour and needs to be fixed when the search is fixed.
+        results = self.projectgroupset.search(
             text="zazzle-dazzle", search_products=True)
         self.assertEqual(0, results.count())
 
     def testProductSearchPercentMatch(self):
         # Search including a percent sign.  The match succeeds and does not
         # raise an exception.
-        results = self.projectset.search(
+        results = self.projectgroupset.search(
             text="110%", search_products=False)
         self.assertEqual(1, results.count())
-        self.assertEqual(self.project3, results[0])
+        self.assertEqual(self.projectgroup3, results[0])
 
 
 class TestProjectGroupPermissions(TestCaseWithFactory):
@@ -189,7 +189,7 @@
         project_group = self.factory.makeProject()
         product = self.factory.makeProduct(
             information_type=InformationType.PROPRIETARY, owner=owner,
-            project=project_group)
+            projectgroup=project_group)
         milestone = self.factory.makeMilestone(product=product)
         self.assertContentEqual([], project_group.milestones)
         with person_logged_in(owner):
@@ -202,7 +202,7 @@
         project_group = self.factory.makeProject()
         product = self.factory.makeProduct(
             information_type=InformationType.PROPRIETARY, owner=owner,
-            project=project_group)
+            projectgroup=project_group)
         milestone = self.factory.makeMilestone(product=product)
         self.assertContentEqual([], project_group.milestones)
         with person_logged_in(owner):

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2014-11-03 07:19:10 +0000
+++ lib/lp/testing/factory.py	2015-01-29 14:24:40 +0000
@@ -940,7 +940,7 @@
         return release_file
 
     def makeProduct(
-        self, name=None, project=None, displayname=None,
+        self, name=None, projectgroup=None, displayname=None,
         licenses=None, owner=None, registrant=None,
         title=None, summary=None, official_malone=None,
         translations_usage=None, bug_supervisor=None, driver=None, icon=None,
@@ -984,7 +984,7 @@
                 summary,
                 self.getUniqueString('description'),
                 licenses=licenses,
-                project=project,
+                project=projectgroup,
                 registrant=registrant,
                 icon=icon,
                 information_type=information_type)

=== modified file 'lib/lp/translations/tests/test_translationpermission.py'
--- lib/lp/translations/tests/test_translationpermission.py	2012-01-01 02:58:52 +0000
+++ lib/lp/translations/tests/test_translationpermission.py	2015-01-29 14:24:40 +0000
@@ -73,8 +73,8 @@
 
     def makeProductInProjectGroup(self):
         """Create a `Product` that's in a `ProjectGroup`."""
-        project = self.factory.makeProject()
-        return self.factory.makeProduct(project=project)
+        projectgroup = self.factory.makeProject()
+        return self.factory.makeProduct(projectgroup=projectgroup)
 
     def closeTranslations(self, product):
         """Set translation permissions for `product` to Closed.


References