Merge lp:~sinzui/launchpad/enable-project-suggetions into lp:launchpad/db-devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~sinzui/launchpad/enable-project-suggetions | ||||||||
Merge into: | lp:launchpad/db-devel | ||||||||
Diff against target: | 0 lines | ||||||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/enable-project-suggetions | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Francis J. Lacoste (community) | release-critical | Approve | |
Brad Crittenden (community) | code | Approve | |
Review via email: mp+24608@code.launchpad.net |
Commit message
Enable project package suggestions.
Description of the change
This is my branch to enable package suggestions on the project page_title.
lp:~sinzui/launchpad/enable-project-suggetions
Diff size: 70
Launchpad bug: https:/
Test command: ./bin/test -vv -t product-
Pre-
Target release: 10.04
Enable package suggestions on the project page_title
-------
The project package suggestions portlet is ready for release so the guard
that prevents it from being seen on lpnet can be removed.
QA
--
Not QAable in this case. I verified that the portlet is show in the test
suite by removing the code and watching the old test fail.
Lint
----
Linting changed files:
lib/lp/
lib/lp/
Test
----
* lib/lp/
Removed test that verified the guard.
Implementation
--------------
* lib/lp/
Removed the or-condition for lpnet.
Since the branch scanner is busy, here is the diff http:// pastebin. ubuntu. com/427084:
=== modified file 'lib/lp/ registry/ browser/ product. py' registry/ browser/ product. py 2010-04-27 13:57:18 +0000 registry/ browser/ product. py 2010-05-03 14:23:16 +0000 sourcepackages) > 0: launchpad. is_lpnet:
date_ next_suggest_ packaging = self.context. date_next_ suggest_ packaging
--- lib/lp/
+++ lib/lp/
@@ -1070,7 +1070,7 @@
"""Are there packages, or can packages be suggested."""
if len(self.
return True
- if self.user is None or config.
+ if self.user is None:
return False
return (
=== modified file 'lib/lp/ registry/ browser/ tests/product- portlet- packages- view.txt' registry/ browser/ tests/product- portlet- packages- view.txt 2010-04-27 13:57:18 +0000 registry/ browser/ tests/product- portlet- packages- view.txt 2010-05-03 14:38:35 +0000 show_portlet
--- lib/lp/
+++ lib/lp/
@@ -225,44 +225,6 @@
>>> view.can_
False
-The can_show_portlet property indicates that the portlet can be rendered. The launchpad. is_lpnet product. owner) initialized_ view( portlet- packages" , principal= product. owner) show_portlet text(view. render( )) push('test_ data', test_data) launchpad. is_lpnet initialized_ view( portlet- packages" , principal= product. owner) show_portlet text(view. render( )) pop('test_ data') date_next_ suggest_ packaging is None or the date is more than one date_next_ suggest_ packaging
-portlet is not rendered if there are no source packages and the environment
-is lpnet.
-
- >>> config.
- False
-
- >>> login_person(
- >>> view = create_
- ... product, name="+
- >>> view.sourcepackages
- []
-
- >>> view.can_
- True
-
- >>> print extract_
- All packages
- Packages in Ubuntu ...
-
- >>> test_data = """
- ... [launchpad]
- ... is_lpnet: True
- ... """
- >>> config.
- >>> config.
- True
-
- >>> view = create_
- ... product, name="+
- >>> view.can_
- False
-
- >>> print extract_
- <BLANKLINE>
-
- >>> ignore = config.
-
The can_show_portlet property is False when
product.
year ago.
@@ -273,6 +235,7 @@
>>> print product.
None
+ >>> login_person( product. owner) initialized_ view( portlet- packages" , principal= product. owner) show_portlet
>>> view = create_
... product, name="+
>>> view.can_