helper functions for API pagetests
Bug #262038 reported by
Edwin Grubbs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
cprov suggested that helper functions automatically hide the api version from urls appearing in the responses from webservice.get(). For example:
def show(thing):
if isinstance(thing, dict):
thing = sorted("%s: %s" % (name, value.replace(
One downside to this is that the pagetest won't print out the full url when the actual output doesn't match the expected output.
Changed in launchpad: | |
status: | Incomplete → Triaged |
Changed in launchpad-foundations: | |
importance: | Undecided → Low |
To post a comment you must log in.
We could even inspect the API objects using something more precise than iteritems() and wrap URL values as testable objects lile:
{{{
class ApiUrl:
def __init__(self, url):
(self. scheme, self.host, self.path, params_unused,
query_ unused, fragment_unused) = urlparse(url)
self.url = url
def __str__(self):
return str(self.path)
def __repr__(self):
return str(self)
}}}