← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/launchpadlib-relative-urls-681767 into lp:launchpad

 

Ian Booth has proposed merging lp:~wallyworld/launchpad/launchpadlib-relative-urls-681767 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/launchpadlib-relative-urls-681767/+merge/102051

== Implementation ==

Modify some launchpad tests with worked around bug 681767 - it is now possible use relative urls with launchpadlib.load()

The mp requires that version 12.2 of lazr.restfulclient be available.

== Tests ==

Simply check that the modified tests pass.

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  versions.cfg
  lib/lp/blueprints/tests/test_webservice.py
  lib/lp/registry/services/tests/test_sharingservice.py


-- 
https://code.launchpad.net/~wallyworld/launchpad/launchpadlib-relative-urls-681767/+merge/102051
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/launchpadlib-relative-urls-681767 into lp:launchpad.
=== modified file 'lib/lp/blueprints/tests/test_webservice.py'
--- lib/lp/blueprints/tests/test_webservice.py	2012-03-08 14:26:18 +0000
+++ lib/lp/blueprints/tests/test_webservice.py	2012-04-16 03:45:24 +0000
@@ -38,10 +38,8 @@
             '/%s/+spec/%s' % (spec_object.target.name, spec_object.name))
 
     def getPillarOnWebservice(self, pillar_obj):
-        # XXX: 2010-11-26, salgado, bug=681767: Can't use relative URLs here.
         launchpadlib = self.getLaunchpadlib()
-        return launchpadlib.load(
-            str(launchpadlib._root_uri) + '/' + pillar_obj.name)
+        return launchpadlib.load(pillar_obj.name)
 
 
 class SpecificationAttributeWebserviceTests(SpecificationWebserviceTestCase):

=== modified file 'lib/lp/registry/services/tests/test_sharingservice.py'
--- lib/lp/registry/services/tests/test_sharingservice.py	2012-04-06 17:28:25 +0000
+++ lib/lp/registry/services/tests/test_sharingservice.py	2012-04-16 03:45:24 +0000
@@ -758,10 +758,7 @@
     def setUp(self):
         super(TestLaunchpadlib, self).setUp()
         self.launchpad = self.factory.makeLaunchpadService(person=self.owner)
-        # XXX 2012-02-23 wallyworld bug 681767
-        # Launchpadlib can't do relative url's
-        self.service = self.launchpad.load(
-            '%s/+services/sharing' % self.launchpad._root_uri)
+        self.service = self.launchpad.load('+services/sharing')
         flag = FeatureFixture(WRITE_FLAG)
         flag.setUp()
         self.addCleanup(flag.cleanUp)

=== modified file 'versions.cfg'
--- versions.cfg	2012-04-11 16:37:24 +0000
+++ versions.cfg	2012-04-16 03:45:24 +0000
@@ -45,7 +45,7 @@
 lazr.jobrunner = 0.2
 lazr.lifecycle = 1.1
 lazr.restful = 0.19.6
-lazr.restfulclient = 0.12.0
+lazr.restfulclient = 0.12.2
 lazr.smtptest = 1.3
 lazr.testing = 0.1.1
 lazr.uri = 1.0.2