Skip to content

Commit

Permalink
Fix windows tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Jan 15, 2025
1 parent f48aa97 commit 7853d63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dkist/net/globus/tests/test_transfer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from pathlib import Path
from unittest import mock
from collections import namedtuple
Expand Down Expand Up @@ -85,9 +84,10 @@ def test_start_transfer(mocker, transfer_client, mock_endpoints):
submit_mock.assert_called_once()
transfer_manifest = submit_mock.call_args_list[0][0][0]["DATA"]

# NOTE: These paths should always be posix not platform specific
for filepath, tfr in zip(file_list, transfer_manifest):
assert filepath.as_posix() == tfr["source_path"]
assert os.path.sep + filepath.name == tfr["destination_path"]
assert f"/{filepath.name}" == tfr["destination_path"]


def test_start_transfer_src_base(mocker, transfer_client, mock_endpoints):
Expand All @@ -102,9 +102,10 @@ def test_start_transfer_src_base(mocker, transfer_client, mock_endpoints):
submit_mock.assert_called_once()
transfer_manifest = submit_mock.call_args_list[0][0][0]["DATA"]

# NOTE: These paths should always be posix not platform specific
for filepath, tfr in zip(file_list, transfer_manifest):
assert filepath.as_posix() == tfr["source_path"]
assert f"{os.path.sep}b{os.path.sep}" + filepath.name == tfr["destination_path"]
assert f"/b/{filepath.name}" == tfr["destination_path"]


def test_start_transfer_multiple_paths(mocker, transfer_client, mock_endpoints):
Expand Down

0 comments on commit 7853d63

Please sign in to comment.