How to use the pyactiveresource.testing.http_fake.initialize function in pyactiveresource

To help you get started, we’ve selected a few pyactiveresource examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / shopify_python_api / test / test_helper.py View on Github external
def setUp(self):
        ActiveResource.site = None
        ActiveResource.headers=None

        shopify.ShopifyResource.clear_session()
        shopify.ShopifyResource.site = "https://this-is-my-test-show.myshopify.com/admin"
        shopify.ShopifyResource.password = None
        shopify.ShopifyResource.user = None

        http_fake.initialize()
        self.http = http_fake.TestHandler
        self.http.set_response(Exception('Bad request'))
        self.http.site = 'https://this-is-my-test-show.myshopify.com'