From 105eff85a5de4393b0a0fd81da8a878b7ebca498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Thu, 7 Nov 2024 09:31:14 +0100 Subject: [PATCH] Add test for LGPL-3 addons based on Enterprise Addons --- news/72.feature | 3 +++ tests/test_cmd_check_licenses.py | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 news/72.feature diff --git a/news/72.feature b/news/72.feature new file mode 100644 index 0000000..f3135a6 --- /dev/null +++ b/news/72.feature @@ -0,0 +1,3 @@ +add a few valid dependency cases +- LGPL-3 module -> OEEL-1/OPL-1 module +- MIT module -> LGPL-3/OEEL-1/OPL-1 module diff --git a/tests/test_cmd_check_licenses.py b/tests/test_cmd_check_licenses.py index 02e8ba5..86108af 100644 --- a/tests/test_cmd_check_licenses.py +++ b/tests/test_cmd_check_licenses.py @@ -107,6 +107,22 @@ def test_v12_ce_lgpl(): ) assert errors == [] +def test_v16_ee_lgpl(): + addons_set = mock_addons_set( + { + "a": {"depends": ["timer"], "license": "LGPL-3"}, + "timer": {}, + } + ) + addons_selection = mock_addons_selection("a") + errors = check_licenses_command( + addons_selection, + addons_set, + transitive=False, + odoo_series=OdooSeries.v16_0, + ) + assert errors == [] + def test_v12_ee_proprietary(): addons_set = mock_addons_set(