~camptocamp/openerp-connector-magento/7.0-export-dependency+lock

« back to all changes in this revision

Viewing changes to magentoerpconnect/tests/test_import_product_image.py

  • Committer: Guewen Baconnier
  • Date: 2014-05-26 09:35:12 UTC
  • Revision ID: guewen.baconnier@camptocamp.com-20140526093512-6jfvqpx1ljnnrz7z
make test_import_images_403 pass again, broken by the http basic auth feature because the url is no longer a string but a urllib2.Request

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        importer = CatalogImageImporter(env)
108
108
        with mock.patch('urllib2.urlopen') as urlopen:
109
109
            def image_url_response(url):
 
110
                url = url.get_full_url()
110
111
                if url == 'http://localhost:9100/media/catalog/product/i/n/ink-eater-krylon-bombear-destroyed-tee-2.jpg':
111
112
                    raise urllib2.HTTPError(url, 404, '404', None, None)
112
113
                elif url == 'http://localhost:9100/media/catalog/product/i/n/ink-eater-krylon-bombear-destroyed-tee-1.jpg':