Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-Suite is broken #166

Open
slyon opened this issue May 8, 2020 · 3 comments
Open

Test-Suite is broken #166

slyon opened this issue May 8, 2020 · 3 comments

Comments

@slyon
Copy link
Contributor

slyon commented May 8, 2020

Dear httplib2-devs,

it seems like the test-suite of this package (in python3/httplib2test.py) is broken, due to the fact that it calls external APIs on servers which do not seem to exist anymore... (at http://bitworking.org/projects/httplib2/test/).

IMO it would be better to use a mock HTTP server, like https://github.com/gabrielfalcao/HTTPretty, which enables self-sustained testing.

For Debian/Ubuntu, I've worked on a patch to disable/skip most of the broken tests. But I've also started to fix some of those via the HTTPretty mock HTTP server. Please have a look at my patch and consider if using HTTPretty would be useful to improve the testability of your application:
https://git.launchpad.net/~slyon/ubuntu/+source/python-httplib2/tree/debian/patches/0003-Fix-autopkgtests.patch?h=fix-autopkgtest

@slyon slyon closed this as completed May 8, 2020
@slyon slyon reopened this May 8, 2020
@temoto
Copy link
Member

temoto commented May 8, 2020

Thanks a lot. I think we're fine with custom mock server over real sockets on localhost for now.

Files you are patching are no longer used, please see tests/ directory.

@slyon
Copy link
Contributor Author

slyon commented May 8, 2020

Thanks for your quick reply!

Yeah... I just saw there are new test/ and tests/ directories, which are for some reason not part of the Debian package... Maybe the "old" tests (python3/httplib2test.py) should be removed, to avoid confusion between test/, tests/ and httplib2test.py.

@temoto
Copy link
Member

temoto commented May 8, 2020

You are absolutely right, clean up is long overdue. At this point I will likely do this at once with python2/ removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants