From 68dd4c2fcd7b2594931708ecf08df097a572c0f4 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 13:42:13 +0200 Subject: [PATCH 1/7] Ignore the .tox folder --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a771a74e..8924905e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ .mr.developer.cfg .Python .python-version +/.tox bin/ buildout-cache/ build/ @@ -37,4 +38,4 @@ var/ pyvenv.cfg /venv/ /.vscode -local.cfg \ No newline at end of file +local.cfg From 4ab94ae6e666b96f2e0c2c8627670bec0aee1ff2 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 14:09:49 +0200 Subject: [PATCH 2/7] Attempt --- .github/workflows/test.yml | 4 ++++ src/collective/easyform/tests/testValidators.py | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64e0e3b1..6d205418 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ master ] workflow_dispatch: + +env: + zope_i18n_compile_mo_files: true + jobs: build: strategy: diff --git a/src/collective/easyform/tests/testValidators.py b/src/collective/easyform/tests/testValidators.py index 8bd8a39b..23d3bd5f 100644 --- a/src/collective/easyform/tests/testValidators.py +++ b/src/collective/easyform/tests/testValidators.py @@ -159,6 +159,7 @@ def test_validator_translation(self): request = self.layer["request"] request["LANGUAGE"] = "de" request.LANGUAGE_TOOL.LANGUAGE = "de" + request.LANGUAGE_TOOL.DEFAULT_LANGUAGE = "de" fields = get_schema(self.ff1) IFieldExtender(fields["comments"]).validators = ["isInternationalPhoneNumber"] From 3d3fbbbce698b68cc97ddae50e75a51182467ec5 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 14:42:25 +0200 Subject: [PATCH 3/7] test --- src/collective/easyform/tests/testValidators.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/collective/easyform/tests/testValidators.py b/src/collective/easyform/tests/testValidators.py index 23d3bd5f..492db993 100644 --- a/src/collective/easyform/tests/testValidators.py +++ b/src/collective/easyform/tests/testValidators.py @@ -156,11 +156,6 @@ def test_talvalidator2(self): self.assertEqual(len(errors), 1) def test_validator_translation(self): - request = self.layer["request"] - request["LANGUAGE"] = "de" - request.LANGUAGE_TOOL.LANGUAGE = "de" - request.LANGUAGE_TOOL.DEFAULT_LANGUAGE = "de" - fields = get_schema(self.ff1) IFieldExtender(fields["comments"]).validators = ["isInternationalPhoneNumber"] set_fields(self.ff1, fields) @@ -169,6 +164,9 @@ def test_validator_translation(self): form = view.form_instance form.update() + form.request.LANGUAGE_TOOL.LANGUAGE = "de" + form.request.LANGUAGE = "de" + data, errors = form.extractData() self.assertEqual(len(errors), 1) From 8cda3d657b7fbd966bf40ae0d8063c9bd3124e7e Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 15:00:03 +0200 Subject: [PATCH 4/7] test --- src/collective/easyform/tests/testValidators.py | 7 ++++--- tests-6.0.x.cfg | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/collective/easyform/tests/testValidators.py b/src/collective/easyform/tests/testValidators.py index 492db993..8bd8a39b 100644 --- a/src/collective/easyform/tests/testValidators.py +++ b/src/collective/easyform/tests/testValidators.py @@ -156,6 +156,10 @@ def test_talvalidator2(self): self.assertEqual(len(errors), 1) def test_validator_translation(self): + request = self.layer["request"] + request["LANGUAGE"] = "de" + request.LANGUAGE_TOOL.LANGUAGE = "de" + fields = get_schema(self.ff1) IFieldExtender(fields["comments"]).validators = ["isInternationalPhoneNumber"] set_fields(self.ff1, fields) @@ -164,9 +168,6 @@ def test_validator_translation(self): form = view.form_instance form.update() - form.request.LANGUAGE_TOOL.LANGUAGE = "de" - form.request.LANGUAGE = "de" - data, errors = form.extractData() self.assertEqual(len(errors), 1) diff --git a/tests-6.0.x.cfg b/tests-6.0.x.cfg index 3d9a6274..d13d0d25 100644 --- a/tests-6.0.x.cfg +++ b/tests-6.0.x.cfg @@ -2,3 +2,4 @@ extends = https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg base.cfg + https://dist.plone.org/release/6.0.11.1/versions.cfg From 71514d38927eb8b82876870b263c79d765da10ad Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 15:00:33 +0200 Subject: [PATCH 5/7] Decrease carbon footprint --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d205418..d78ecaa4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,9 +17,6 @@ jobs: matrix: config: # [Python version, tox env] - - ["3.8", "plone60-py38"] - - ["3.9", "plone60-py39"] - - ["3.10", "plone60-py310"] - ["3.11", "plone60-py311"] runs-on: ubuntu-latest name: ${{ matrix.config[1] }} From 23bcb4ad7e33da57c699aa943649dfb17ea84c1e Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 15:09:38 +0200 Subject: [PATCH 6/7] Decrease carbon footprint --- tests-6.0.x.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests-6.0.x.cfg b/tests-6.0.x.cfg index d13d0d25..0c0a9025 100644 --- a/tests-6.0.x.cfg +++ b/tests-6.0.x.cfg @@ -2,4 +2,4 @@ extends = https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg base.cfg - https://dist.plone.org/release/6.0.11.1/versions.cfg + https://dist.plone.org/release/6.0.12/versions.cfg From 43e29b63369fea149272bca9150df33c78004ef6 Mon Sep 17 00:00:00 2001 From: ale-rt Date: Tue, 8 Oct 2024 15:17:06 +0200 Subject: [PATCH 7/7] Test --- tests-6.0.x.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests-6.0.x.cfg b/tests-6.0.x.cfg index 0c0a9025..538592f4 100644 --- a/tests-6.0.x.cfg +++ b/tests-6.0.x.cfg @@ -2,4 +2,6 @@ extends = https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-6.0.x.cfg base.cfg - https://dist.plone.org/release/6.0.12/versions.cfg + +[versions] +Products.validation = 2.1.3