details: https://code.tryton.org/tryton/commit/fe8a0399c799
branch: default
user: Nicolas Évrard <[email protected]>
date: Tue Feb 24 22:37:16 2026 +0100
description:
Remove unrequired XML files from tests module registration
diffstat:
trytond/trytond/tests/test_chat.py | 5 +++++
trytond/trytond/tests/test_ir.py | 6 +++++-
trytond/trytond/tests/test_report.py | 17 +++++++++++++++++
trytond/trytond/tests/test_sequence.py | 14 ++++++++++++++
trytond/trytond/tests/tryton.cfg | 2 --
5 files changed, 41 insertions(+), 3 deletions(-)
diffs (187 lines):
diff -r 8f9a1a21539c -r fe8a0399c799 trytond/trytond/tests/test_chat.py
--- a/trytond/trytond/tests/test_chat.py Tue Sep 01 18:49:45 2026 +0200
+++ b/trytond/trytond/tests/test_chat.py Tue Feb 24 22:37:16 2026 +0100
@@ -5,7 +5,9 @@
from email.utils import getaddresses
from unittest.mock import patch
+from trytond.convert import import_xml
from trytond.pool import Pool
+from trytond.tools import file_open
from trytond.transaction import Transaction
from .test_tryton import TestCase, activate_module, with_transaction
@@ -30,6 +32,9 @@
@with_transaction()
def test_chat_post(self):
"Test posting on chat"
+ with file_open('message.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
User = pool.get('res.user')
Room = pool.get('test.chat.room')
diff -r 8f9a1a21539c -r fe8a0399c799 trytond/trytond/tests/test_ir.py
--- a/trytond/trytond/tests/test_ir.py Tue Sep 01 18:49:45 2026 +0200
+++ b/trytond/trytond/tests/test_ir.py Tue Feb 24 22:37:16 2026 +0100
@@ -17,11 +17,12 @@
from dateutil.relativedelta import relativedelta
+from trytond.convert import import_xml
from trytond.ir.exceptions import SequenceAffixError
from trytond.ir.lang import _replace
from trytond.pool import Pool
from trytond.pyson import Eval, If, PYSONEncoder
-from trytond.tools import timezone
+from trytond.tools import file_open, timezone
from trytond.transaction import Transaction
from .test_tryton import (
@@ -99,6 +100,9 @@
@with_transaction()
def test_sequence_substitutions(self):
'Test Sequence Substitutions'
+ with file_open('sequence.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Sequence = pool.get('ir.sequence')
SequenceType = pool.get('ir.sequence.type')
diff -r 8f9a1a21539c -r fe8a0399c799 trytond/trytond/tests/test_report.py
--- a/trytond/trytond/tests/test_report.py Tue Sep 01 18:49:45 2026 +0200
+++ b/trytond/trytond/tests/test_report.py Tue Feb 24 22:37:16 2026 +0100
@@ -11,11 +11,13 @@
except ImportError:
mrml = None
+from trytond.convert import import_xml
from trytond.model.exceptions import AccessError
from trytond.pool import Pool
from trytond.report.report import Report, get_email
from trytond.tests.test_tryton import (
TestCase, activate_module, with_transaction)
+from trytond.tools import file_open
from trytond.transaction import Transaction
@@ -45,6 +47,9 @@
@with_transaction()
def test_execute(self):
"Execute report"
+ with file_open('report.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Report = pool.get('test.test_report', type='report')
@@ -55,6 +60,9 @@
@with_transaction()
def test_execute_without_access(self):
"Execute report without model access"
+ with file_open('report.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
ActionReport = pool.get('ir.action.report')
Group = pool.get('res.group')
@@ -74,6 +82,9 @@
@with_transaction()
def test_execute_without_model_access(self):
"Execute report without model access"
+ with file_open('report.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Report = pool.get('test.test_report', type='report')
ModelAccess = pool.get('ir.model.access')
@@ -88,6 +99,9 @@
@with_transaction()
def test_execute_without_read_access(self):
"Execute report without read access"
+ with file_open('report.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Report = pool.get('test.test_report', type='report')
Model = pool.get('test.access')
@@ -112,6 +126,9 @@
@with_transaction()
def test_convert_mjml_to_html(self):
"Test convert MJML to HTML"
+ with file_open('report.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Report = pool.get('test.test_report_mjml', type='report')
diff -r 8f9a1a21539c -r fe8a0399c799 trytond/trytond/tests/test_sequence.py
--- a/trytond/trytond/tests/test_sequence.py Tue Sep 01 18:49:45 2026 +0200
+++ b/trytond/trytond/tests/test_sequence.py Tue Feb 24 22:37:16 2026 +0100
@@ -3,10 +3,12 @@
# this repository contains the full copyright notices and license terms.
import datetime
+from trytond.convert import import_xml
from trytond.ir.sequence import LastTimestampError
from trytond.pool import Pool
from trytond.tests.test_tryton import (
TestCase, activate_module, with_transaction)
+from trytond.tools import file_open
from trytond.transaction import Transaction
@@ -26,6 +28,9 @@
@with_transaction()
def test_incremental(self):
'Test incremental'
+ with file_open('sequence.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Sequence = self.get_model()
SequenceType = pool.get('ir.sequence.type')
@@ -63,6 +68,9 @@
@with_transaction()
def test_decimal_timestamp(self):
'Test Decimal Timestamp'
+ with file_open('sequence.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Sequence = self.get_model()
SequenceType = pool.get('ir.sequence.type')
@@ -93,6 +101,9 @@
@with_transaction()
def test_hexadecimal_timestamp(self):
'Test Hexadecimal Timestamp'
+ with file_open('sequence.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Sequence = self.get_model()
SequenceType = pool.get('ir.sequence.type')
@@ -124,6 +135,9 @@
@with_transaction()
def test_prefix_suffix(self):
'Test prefix/suffix'
+ with file_open('sequence.xml', subdir='tests') as xml:
+ import_xml(xml)
+
pool = Pool()
Sequence = self.get_model()
SequenceType = pool.get('ir.sequence.type')
diff -r 8f9a1a21539c -r fe8a0399c799 trytond/trytond/tests/tryton.cfg
--- a/trytond/trytond/tests/tryton.cfg Tue Sep 01 18:49:45 2026 +0200
+++ b/trytond/trytond/tests/tryton.cfg Tue Feb 24 22:37:16 2026 +0100
@@ -3,10 +3,8 @@
ir
res
xml:
- sequence.xml
workflow.xml
wizard.xml
- report.xml
modelview.xml
field_function.xml
message.xml