[ADD] pyttest.ini file + test for cli_build [ADD] call to gitaggregate [REF] harmonize release & version words ; remove python version ; add... [REM] remove towncrier for the time being [REF\] enable both test and improve : each test should have it's own output folder to reduce gitaggagregate duration
42 lines
995 B
Python
42 lines
995 B
Python
from pathlib import Path
|
|
|
|
from click.testing import CliRunner
|
|
from plumbum.cmd import mkdir
|
|
|
|
from odoo_openupgrade_wizard.cli import main
|
|
|
|
|
|
def test_cli_get_code():
|
|
output_folder_path = Path("./tests/output_02")
|
|
mkdir([output_folder_path, "--parents"])
|
|
|
|
# We initialize an env with only one version to avoid to git clone
|
|
# large data
|
|
CliRunner().invoke(
|
|
main,
|
|
[
|
|
"--env-folder=%s" % output_folder_path,
|
|
"init",
|
|
"--initial-release=14.0",
|
|
"--final-release=14.0",
|
|
"--extra-repository=OCA/web",
|
|
],
|
|
)
|
|
|
|
result = CliRunner().invoke(
|
|
main,
|
|
[
|
|
"--env-folder=%s" % output_folder_path,
|
|
"get-code",
|
|
],
|
|
)
|
|
assert result.exit_code == 0
|
|
|
|
openupgrade_path = output_folder_path / Path(
|
|
"./src/env_14.0/src/openupgrade"
|
|
)
|
|
|
|
assert openupgrade_path.exists()
|
|
|
|
assert (openupgrade_path / Path("openupgrade_framework")).exists()
|