New issue 552 by Arfrever...@gmail.com:
atom_tests.mock_http_test.MockHttpClientUnitTest.testRecordResponse() fails
http://code.google.com/p/gdata-python-client/issues/detail?id=552
atom_tests.mock_http_test.MockHttpClientUnitTest.testRecordResponse()
fails. I use gdata-2.0.15, but this problem occurs also with at least
gdata-2.0.14. This problem occurs with both Python 2.6 and 2.7.
Output of tests contains:
Running all tests in module atom_tests.mock_http_test
F..
======================================================================
FAIL: testRecordResponse (atom_tests.mock_http_test.MockHttpClientUnitTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/gdata-2.0.15/work/gdata-2.0.15/tests/atom_tests/mock_http_test.py",
line 49, in testRecordResponse
self.assertEquals(live_response.status, 200)
AssertionError: 502 != 200
----------------------------------------------------------------------
Ran 3 tests in 40.224s
FAILED (failures=1)
After a few different approaches based on the tutorial, I am still getting
the same error as well as this one:
FAIL: testFindTokenForScope (gdata_tests.client_test.GDataClientTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/yitingc/gdata.py-1.2.4/tests/gdata_tests/client_test.py", line
82, in testFindTokenForScope
self.client.token_store.find_token('foo%s' % scope1) != auth_token)
AssertionError
I'm getting the same problem. Here's the output:
Running all tests in module atom_tests.mock_http_test
F..
======================================================================
FAIL: testRecordResponse (atom_tests.mock_http_test.MockHttpClientUnitTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/michaelcupino/Desktop/gdata-2.0.15/tests/atom_tests/mock_http_test.py",
line 49, in t
estRecordResponse
self.assertEquals(live_response.status, 200)
AssertionError: 502 != 200
----------------------------------------------------------------------
Ran 3 tests in 40.105s
FAILED (failures=1)
Here's the output after I attempted to reinstall:
$ python ./setup.py install
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267:
UserWarning:
Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
running install_lib
running install_egg_info
Removing
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gdata-2.0.15-py2.7.egg-info
Writing
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gdata-2.0.15-py2.7.egg-info
I looked up solutions for the warning, and it was suggested to install
setuptools. Removing and installing setuptools didn't help either with that
warning.
Confirmed on Debian unstable with gdata 2.0.16.
Same issue ...
"""
Running all tests in module atom_tests.mock_http_test
F..
======================================================================
FAIL: testRecordResponse (atom_tests.mock_http_test.MockHttpClientUnitTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jonathan/Downloads/gdata-2.0.16/tests/atom_tests/mock_http_test.py",
line 49, in testRecordResponse
self.assertEquals(live_response.status, 200)
AssertionError: 502 != 200
----------------------------------------------------------------------
Ran 3 tests in 40.595s
"""
Mac OS X 10.7.3
Python 2.7.1
gdata-2.0.16
I believe this is an error on Google servers, not a python-gdata bug.
$ wget http://www.google.com/base/feeds/snippets?max-results=1
--2012-04-22 15:40:45--
http://www.google.com/base/feeds/snippets?max-results=1
Resolving www.google.com (www.google.com)... 74.125.232.17, 74.125.232.20,
74.125.232.16, ...
Connecting to www.google.com (www.google.com)|74.125.232.17|:80...
connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2012-04-22 15:41:25 ERROR 502: Bad Gateway.