-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing f-string in EP manager method + test (#683)
`TransferClient.endpoint_manager_task_successful_transfers` was not making calls correctly. Setup fixture data for a response, add a relevant test, and add the missing `f` prefix. resolves #682
- Loading branch information
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Fix a typo in ``TransferClient.endpoint_manager_task_successful_transfers`` | ||
which prevented calls from being made correctly (:pr:`NUMBER`) |
24 changes: 24 additions & 0 deletions
24
src/globus_sdk/_testing/data/transfer/endpoint_manager_task_successful_transfers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from globus_sdk._testing.models import RegisteredResponse, ResponseSet | ||
|
||
from ._common import TASK_ID | ||
|
||
RESPONSES = ResponseSet( | ||
metadata={"task_id": TASK_ID}, | ||
default=RegisteredResponse( | ||
service="transfer", | ||
method="GET", | ||
path=f"/endpoint_manager/task/{TASK_ID}/successful_transfers", | ||
json={ | ||
"DATA_TYPE": "successful_transfers", | ||
"marker": 0, | ||
"next_marker": 93979, | ||
"DATA": [ | ||
{ | ||
"destination_path": "/path/to/destination", | ||
"source_path": "/path/to/source", | ||
"DATA_TYPE": "successful_transfer", | ||
} | ||
], | ||
}, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
...nal/services/transfer/endpoint_manager/test_endpoint_manager_task_successful_transfers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
import pytest | ||
from globus_sdk._testing import load_response | ||
|
||
|
||
@pytest.mark.xfail | ||
def test_endpoint_manager_task_successful_transfers(): | ||
raise NotImplementedError | ||
def test_endpoint_manager_task_successful_transfers(client): | ||
meta = load_response(client.endpoint_manager_task_successful_transfers).metadata | ||
|
||
response = client.endpoint_manager_task_successful_transfers(meta["task_id"]) | ||
|
||
assert response.http_status == 200 | ||
assert response["DATA_TYPE"] == "successful_transfers" |