From 9ce6ce66fd122c2640c9b3a7a77438f3d9a6b018 Mon Sep 17 00:00:00 2001 From: Bob Silverberg Date: Sun, 31 Mar 2013 22:15:47 -0400 Subject: [PATCH] Change _do_post return value on failure to None --- mocks/mock_product.py | 2 +- mocks/moztrap_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mocks/mock_product.py b/mocks/mock_product.py index 1d887ec..a2bdcb0 100644 --- a/mocks/mock_product.py +++ b/mocks/mock_product.py @@ -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']}) diff --git a/mocks/moztrap_api.py b/mocks/moztrap_api.py index 20f2137..432d892 100644 --- a/mocks/moztrap_api.py +++ b/mocks/moztrap_api.py @@ -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."""