introduced in https://github.com/galaxyproject/galaxy/pull/18003 .
In particular, when using requests in the tests to connect to Galaxy
or the ToolShed it's not needed to use the modified headers.
Also:
- Move some imports after conditional imports.
- Fix type annotations in `lib/tool_shed/test/base/populators.py`
- Fix typo bug in `test/unit/util/test_get_url.py`
It is pretty cool to use hooks and an alternative tool submission
endpoint, but this is less invasive. We'd have to do this anyway for
cases where the upload is already on the server and the pre-finish hook
doesn't fire.
Without any proxying and tusd running as a separate service:
``
tusd -upload-dir=./database/tmp -hooks-http=http://localhost:8000/api/upload/_resumable_upload -hooks-http-forward-headers=X-Api-Key --hooks-enabled-events=post-finish
```
Adjust ./database/tmp to new_file_path, and this should work. Now we
just need to proxy `api/upload/resumable_upload` to `<tusd_port>/files`
and we're good for a production setup.