← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/launchpad:fix-distribution-broken-tests into launchpad:master

 

Thiago F. Pappacena has proposed merging ~pappacena/launchpad:fix-distribution-broken-tests into launchpad:master.

Commit message:
Fixing broken distribution test.

A previous MP (https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/383657) introduced our standard `from __future__ import absolute_import, print_function, unicode_literals` in lp/registry/browser/distribution.py, but the tests were not prepared for this. This fixes the regression, but it would be interesting to run the full suite and include back this `from __future__ import` statement.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/383993
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:fix-distribution-broken-tests into launchpad:master.
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index 128b429..ffabedb 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -3,8 +3,6 @@
 
 """Browser views for distributions."""
 
-from __future__ import absolute_import, print_function, unicode_literals
-
 __metaclass__ = type
 
 __all__ = [
@@ -44,6 +42,7 @@ from collections import defaultdict
 import datetime
 
 from lazr.restful.utils import smartquote
+import six
 from zope.component import getUtility
 from zope.event import notify
 from zope.formlib import form
@@ -1423,4 +1422,4 @@ class DistributionOCIProjectSearchView(LaunchpadView):
     @property
     def search_results(self):
         return getUtility(IOCIProjectSet).findByDistributionAndName(
-            self.context, self.text or '')
+            self.context, self.text or six.ensure_text(''))