# Path: tests/functional/ucare_cli/helpers.py
# def arg_namespace(arguments_str):
#     return ucare_argparser().parse_args(arguments_str.split())
# 
# Path: pyuploadcare/ucare_cli/commands/store_files.py
# def store_files(arg_namespace, client: Uploadcare):
#     client.store_files(arg_namespace.paths)
#     _wait_if_needed(
#         arg_namespace,
#         client,
#         lambda file: file.is_stored(),
#         "timed out trying to store",
#     )


import pytest
from tests.functional.ucare_cli.helpers import arg_namespace
from pyuploadcare.ucare_cli.commands.store_files import store_files



def test_store_parse_wait_arg():
    args = arg_namespace("store --wait f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert args.wait


def test_store_wait_is_true_by_default():
    args = arg_namespace("store f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert args.wait


def test_store_parse_no_wait_arg():
    args = arg_namespace("store --nowait f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert not args.wait


@pytest.mark.vcr
def test_store_one_file(uploadcare):
    store_files(

# Path: tests/functional/ucare_cli/helpers.py
# def arg_namespace(arguments_str):
#     return ucare_argparser().parse_args(arguments_str.split())
# 
# Path: pyuploadcare/ucare_cli/commands/store_files.py
# def store_files(arg_namespace, client: Uploadcare):
#     client.store_files(arg_namespace.paths)
#     _wait_if_needed(
#         arg_namespace,
#         client,
#         lambda file: file.is_stored(),
#         "timed out trying to store",
#     )


# Path: tests/functional/ucare_cli/test_store_files.py
import pytest
from tests.functional.ucare_cli.helpers import arg_namespace
from pyuploadcare.ucare_cli.commands.store_files import store_files




def test_store_parse_wait_arg():
    args = arg_namespace("store --wait f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert args.wait


def test_store_wait_is_true_by_default():
    args = arg_namespace("store f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert args.wait


def test_store_parse_no_wait_arg():
    args = arg_namespace("store --nowait f4d55a4d-dda5-4fca-ace8-c87799d77a3c")
    assert not args.wait


@pytest.mark.vcr
def test_store_one_file(uploadcare):
    store_files(

        arg_namespace("store --nowait f4d55a4d-dda5-4fca-ace8-c87799d77a3c"),