Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Cache Build Requirements
id: pip-cache-step
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}
Expand All @@ -44,7 +44,7 @@ jobs:
with:
python-version: 3.6
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}
Expand Down
1 change: 0 additions & 1 deletion tests/providers/onedrive/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ async def test_download_standard_file_range(self, provider, download_fixtures):
assert content == b'te'
assert aiohttpretty.has_call(method='GET', uri=download_url,
headers={'Range': 'bytes=0-1',
'Authorization': 'bearer wrote harry potter',
'accept-encoding': ''})

@pytest.mark.asyncio
Expand Down
2 changes: 2 additions & 0 deletions waterbutler/providers/onedrive/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ async def download(self, # type: ignore
'GET',
download_url,
range=range,
no_auth_header=True, # if download_url is signed, OD will sometimes 401 if auth header is included
expects=(HTTPStatus.OK, HTTPStatus.PARTIAL_CONTENT),
headers={'accept-encoding': ''},
throws=exceptions.DownloadError,
Expand Down Expand Up @@ -766,6 +767,7 @@ async def _chunked_upload_stream_by_range(self, upload_url, data, start_range=0,
start_range + len(data) - 1,
total_size)
},
no_auth_header=True, # this endpoint will sometimes 401 if the Auth header included
expects=(HTTPStatus.ACCEPTED, HTTPStatus.CREATED),
throws=exceptions.UploadError
)
Expand Down
Loading