launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11952
[Merge] lp:~adeuring/launchpad/buildbot-failure into lp:launchpad
Abel Deuring has proposed merging lp:~adeuring/launchpad/buildbot-failure into lp:launchpad.
Requested reviews:
Abel Deuring (adeuring): code
For more details, see:
https://code.launchpad.net/~adeuring/launchpad/buildbot-failure/+merge/124213
fix a test/buildbot failure:
r15949 and r15945 had conflicting changes: r15945 enabled permission checks for specifcations based on access grants. r15949 aded a test related to SPeicifcation.information_type but was based on an older version of devel. This branch fixes a test failure in r15949 caused by the new permission checks.
--
https://code.launchpad.net/~adeuring/launchpad/buildbot-failure/+merge/124213
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py 2012-09-12 19:40:39 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py 2012-09-13 14:23:23 +0000
@@ -321,7 +321,10 @@
def createSpec(self, information_type):
"""Create a specification via a browser."""
with person_logged_in(self.user):
- product = self.factory.makeProduct()
+ product = self.factory.makeProduct(owner=self.user)
+ policy = self.factory.makeAccessPolicy(product, information_type)
+ self.factory.makeAccessPolicyGrant(
+ policy, grantee=self.user, grantor=self.user)
browser = self.getViewBrowser(product, view_name='+addspec')
control = browser.getControl(information_type.title)
if not control.selected:
=== modified file 'lib/lp/blueprints/model/specification.py'
--- lib/lp/blueprints/model/specification.py 2012-09-12 19:40:39 +0000
+++ lib/lp/blueprints/model/specification.py 2012-09-13 14:23:23 +0000
@@ -1161,12 +1161,13 @@
"definition_status must an item found in "
"NewSpecificationDefinitionStatus.")
definition_status = SpecificationDefinitionStatus.items[status_name]
- return Specification(name=name, title=title, specurl=specurl,
+ spec = Specification(name=name, title=title, specurl=specurl,
summary=summary, priority=priority,
definition_status=definition_status, owner=owner,
approver=approver, product=product, distribution=distribution,
- assignee=assignee, drafter=drafter, whiteboard=whiteboard,
- information_type=information_type)
+ assignee=assignee, drafter=drafter, whiteboard=whiteboard)
+ spec.transitionToInformationType(information_type, None)
+ return spec
def getDependencyDict(self, specifications):
"""See `ISpecificationSet`."""
Follow ups