Permalink
Browse files

Fixes for issue #71 - add use_cdd=false to all requests

  • Loading branch information...
simoncadman committed Aug 14, 2014
1 parent a1fc030 commit 6814810e05c2b2b5c882790c01247e2d1b64ac95
Showing with 5 additions and 5 deletions.
  1. +3 −3 cloudprintrequestor.py
  2. +2 −2 testing/mockrequestor.py
View
@@ -90,10 +90,10 @@ def doRequest(self, path, headers=None, data=None, boundary=None, testResponse=N
return decodedresponse
def search(self):
- return self.doRequest('search?connection_status=ALL&client=webui')
+ return self.doRequest('search?connection_status=ALL&client=webui&use_cdd=false')
def printer(self, printerid):
- return self.doRequest('printer?printerid=%s' % printerid)
+ return self.doRequest('printer?printerid=%s&use_cdd=false' % printerid)
def submit(self, edata, boundary):
- return self.doRequest('submit', data=edata, boundary=boundary)
+ return self.doRequest('submit?use_cdd=false', data=edata, boundary=boundary)
View
@@ -37,7 +37,7 @@ def mockSubmit(self, path, headers, data, boundary):
return json.dumps(result)
def mockPrinter(self, path, headers, data, boundary):
- printername = path.split('=')[1]
+ printername = path.split('=')[1].split('&')[0]
foundPrinter = None
for printer in self.printers:
if printer['id'] == printername:
@@ -55,6 +55,6 @@ def doRequest(self, path, headers=None, data=None, boundary=None):
return json.loads(self.mockSearch(path, headers, data, boundary))
if (path.startswith('printer?')):
return json.loads(self.mockPrinter(path, headers, data, boundary))
- if (path == 'submit'):
+ if (path.startswith('submit?')):
return json.loads(self.mockSubmit(path, headers, data, boundary))
return None

0 comments on commit 6814810

Please sign in to comment.