From 753b5fa465ef20c83aeb2755cd81dc43ee931a23 Mon Sep 17 00:00:00 2001 From: Bongjin Koo Date: Mon, 16 May 2022 18:03:06 -0700 Subject: [PATCH] Issue #74: Testing test_datasets.py. --- tests/test_datasets.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_datasets.py b/tests/test_datasets.py index b933faa..4dea9c5 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -55,11 +55,16 @@ def test_constructor_invalid_because_no_token(): def test_upload_valid(setup, set_file_path): """Test the upload method.""" + file_list = subprocess.run( + f"osf ls", shell=True, text=True, capture_output=True + ).stdout + print(io.StringIO(file_list).readlines()) + setup.upload(set_file_path[0] + set_file_path[1], set_file_path[1]) file_exists = False # file_list = os.popen("osf ls") file_list = subprocess.run( - f"osf lsu", shell=True, text=True, capture_output=True + f"osf ls", shell=True, text=True, capture_output=True ).stdout file_list = io.StringIO(file_list) line = file_list.readline()