repo2docker
repo2docker copied to clipboard
Cleanup hydroshare provider and stop using urlopen
Sort-of a follow up to https://github.com/jupyterhub/repo2docker/pull/993. Follow-up to #1390, in moving hydroshare tests to be integration tests
It does two things, that are intertwined:
Cleanup using urlopen vs requests
We were:
- In some cases, directly using requests
- In some cases, directly using the stdlib's urlopen
- In some cases, had a method named urlopen that simply passed things through to requests
This is unnecessarily confusing, and seems to primarily be done for the benefit of mocking the network calls. However, as described in the recently merged https://github.com/jupyterhub/repo2docker/pull/1390, I don't think mocking is appropriate here as it means we don't actually catch problems.
This PR mostly focuses on getting unifying to only using requests directly with as little indirection as possible.
Cleanup hydroshare
The biggest user of the slightly easier mocking provided by the url redirection was hydroshare. Similar to #1390, this PR now:
- Turns the hydroshare tests into integration tests
- Simplifies the detection logic and makes it clearer what we are detecting (with URL examples in the tests)