WADL test should use XPath expressions instead of iterating over children

Bug #318968 reported by Leonard Richardson
2
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned

Bug Description

The WADL generation test has a bunch of code like this:

    >>> date_targeted = single_list_value(
    ... [param for param in new_milestone_repr
    ... if param.attrib.get('name') == 'date_targeted'])

Rather than iterating over the <param> tags, we should just grab the param tag we want with an XPath expression. The reason we haven't done that traditionally is that the XPath expression takes the fully-qualified name of a tag, which in these tests is huge. But a helper method could avoid that problem.

Tags: api
affects: launchpad-foundations → lazr.restful
Changed in lazr.restful:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.