~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/hardwaredb/stories/webservice/xx-hwdb.txt

  • Committer: Curtis Hovey
  • Date: 2011-12-24 17:09:12 UTC
  • mfrom: (14600.1.12 apocalypta-1)
  • mto: This revision was merged to the branch mainline in revision 14602.
  • Revision ID: curtis.hovey@canonical.com-20111224170912-e1h1863jnphaqt81
merged apocalypta.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    >>> print webservice.get('/+hwdb/+device/1000000')
133
133
    HTTP/1.1 404 Not Found
134
134
    ...
135
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
135
    Object: <lp.systemhomes.HWDBApplication
136
136
    ... name: u'1000000'
137
137
 
138
138
...and when an otherwise invalid ID is passed.
140
140
    >>> print webservice.get('/+hwdb/+device/nonsense')
141
141
    HTTP/1.1 404 Not Found
142
142
    ...
143
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
143
    Object: <lp.systemhomes.HWDBApplication
144
144
    ... name: u'nonsense'
145
145
 
146
146
HWDevice.drivers returns the list of drivers associtaed with this device.
225
225
by name works.
226
226
 
227
227
    >>> from zope.component import getUtility
228
 
    >>> from canonical.launchpad.ftests import login, logout, ANONYMOUS
 
228
    >>> from lp.testing import login, logout, ANONYMOUS
229
229
    >>> from lp.hardwaredb.interfaces.hwdb import IHWDriverSet
230
230
    >>> login(ANONYMOUS)
231
231
    >>> driver_set = getUtility(IHWDriverSet)
392
392
    >>> print webservice.get('/+hwdb/+driver/1000000')
393
393
    HTTP/1.1 404 Not Found
394
394
    ...
395
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
395
    Object: <lp.systemhomes.HWDBApplication
396
396
    ... name: u'1000000'
397
397
 
398
398
...and when an otherwise invalid ID is passed.
400
400
    >>> print webservice.get('/+hwdb/+driver/nonsense')
401
401
    HTTP/1.1 404 Not Found
402
402
    ...
403
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
403
    Object: <lp.systemhomes.HWDBApplication
404
404
    ... name: u'nonsense'
405
405
 
406
406
Once we've got a driver, we can search for submissions associated with it.
870
870
    >>> print webservice.get('/+hwdb/+hwvendorid/1000000')
871
871
    HTTP/1.1 404 Not Found
872
872
    ...
873
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
873
    Object: <lp.systemhomes.HWDBApplication
874
874
    ... name: u'1000000'
875
875
 
876
876
...and when an otherwise invalid ID is passed.
878
878
    >>> print webservice.get('/+hwdb/+hwvendorid/nonsense')
879
879
    HTTP/1.1 404 Not Found
880
880
    ...
881
 
    Object: <canonical.launchpad.systemhomes.HWDBApplication
 
881
    Object: <lp.systemhomes.HWDBApplication
882
882
    ... name: u'nonsense'
883
883
 
884
884
Known vendor IDs for a given bus can be queried with