# 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/convert_document.py
# def convert_document(arg_namespace, client: Uploadcare) -> None:
#     file = client.file(arg_namespace.path)
# 
#     transformation = DocumentTransformation()
# 
#     if arg_namespace.format:
#         transformation.format(arg_namespace.format)
# 
#     if arg_namespace.page:
#         transformation.format(arg_namespace.page)
# 
#     kwargs = {}
#     if arg_namespace.store:
#         kwargs["store"] = True
# 
#     converted_file = file.convert_document(transformation, **kwargs)
# 
#     info = converted_file.info
#     pprint(info)


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



@pytest.mark.vcr
def test_convert_document(uploadcare, capsys):
    convert_document(
        arg_namespace(
            "convert_document 2dcf583f-8de7-4b53-ae13-54c21bae39c5 --format png"
        ),

# 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/convert_document.py
# def convert_document(arg_namespace, client: Uploadcare) -> None:
#     file = client.file(arg_namespace.path)
# 
#     transformation = DocumentTransformation()
# 
#     if arg_namespace.format:
#         transformation.format(arg_namespace.format)
# 
#     if arg_namespace.page:
#         transformation.format(arg_namespace.page)
# 
#     kwargs = {}
#     if arg_namespace.store:
#         kwargs["store"] = True
# 
#     converted_file = file.convert_document(transformation, **kwargs)
# 
#     info = converted_file.info
#     pprint(info)


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




@pytest.mark.vcr
def test_convert_document(uploadcare, capsys):
    convert_document(
        arg_namespace(
            "convert_document 2dcf583f-8de7-4b53-ae13-54c21bae39c5 --format png"
        ),

        uploadcare,