Change _do_post return value on failure to None
This commit is contained in:
Родитель
7c9c29e046
Коммит
9ce6ce66fd
|
@ -17,7 +17,7 @@ class MockProduct(dict):
|
|||
create_product_page = MozTrapCreateProductPage(mozwebqa)
|
||||
|
||||
dt_string = datetime.utcnow().isoformat()
|
||||
self['id'] = 0
|
||||
self['id'] = None
|
||||
self['name'] = u'%(name)s %(dt_string)s' % {'name': name, 'dt_string': dt_string}
|
||||
self['description'] = u'%(desc)s created on %(dt_string)s' % {'desc': description, 'dt_string': dt_string}
|
||||
self['locator'] = (create_product_page._product_locator[0], create_product_page._product_locator[1] % {'product_name': self['name']})
|
||||
|
|
|
@ -37,7 +37,7 @@ class MoztrapAPI:
|
|||
else:
|
||||
print "Failed to create resource: %s with %s.\n%s" % (
|
||||
post_data, response.status_code, response.text)
|
||||
return 0
|
||||
return None
|
||||
|
||||
def _do_delete(self, uri, id):
|
||||
"""Delete to an API method and return True or False."""
|
||||
|
|
Загрузка…
Ссылка в новой задаче