python-oembed icon indicating copy to clipboard operation
python-oembed copied to clipboard

Tests fail when HTTP server is running on localhost

Open mgorny opened this issue 7 years ago • 0 comments

 * python2_7: running distutils-r1_run_phase python_test
E.......
======================================================================
ERROR: testBrokenEndpoint (test_net.ConsumerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/python-oembed-0.2.4/work/python-oembed-0.2.4/test/test_net.py", line 134, in testBrokenEndpoint
    'http://localhost/test')
  File "/usr/lib64/python2.7/unittest/case.py", line 473, in assertRaises
    callableObj(*args, **kwargs)
  File "/tmp/portage/dev-python/python-oembed-0.2.4/work/python-oembed-0.2.4/oembed/__init__.py", line 503, in embed
    return self._request(url, **opt)
  File "/tmp/portage/dev-python/python-oembed-0.2.4/work/python-oembed-0.2.4/oembed/__init__.py", line 485, in _request
    return endpoint.get(url, **opt)
  File "/tmp/portage/dev-python/python-oembed-0.2.4/work/python-oembed-0.2.4/oembed/__init__.py", line 337, in get
    return self.fetch(self.request(url, **opt))
  File "/tmp/portage/dev-python/python-oembed-0.2.4/work/python-oembed-0.2.4/oembed/__init__.py", line 366, in fetch
    raise OEmbedError('Invalid mime-type in response - %s' % headers['Content-Type'])
OEmbedError: Invalid mime-type in response - text/html

mgorny avatar Apr 21 '18 08:04 mgorny