Skip to content

Commit

Permalink
[FIX] base: filter on installed modules
Browse files Browse the repository at this point in the history
Before this commit, this test will fail depending on installed modules
(community, single, ...)

Filtering on installed modules fixes the issue.

closes #163714

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
  • Loading branch information
Xavier-Do committed Apr 30, 2024
1 parent 13dce20 commit eb00051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions odoo/addons/base/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4567,7 +4567,7 @@ def test_uncommented_invisible_field(self):
'helpdesk_repair',
)

modules_without_error = set(only_log_modules)
modules_without_error = set(self.env['ir.module.module'].search([('state', '=', 'intalled'), ('name', 'in', only_log_modules)]).mapped('name'))
module_log_views = defaultdict(list)
module_error_views = defaultdict(list)
uncommented_regexp = r'''(<field [^>]*invisible=['"](True|1)['"][^>]*>)[\s\t\n ]*(.*)'''
Expand All @@ -4594,7 +4594,7 @@ def test_uncommented_invisible_field(self):
_logger.error('%s\n%s', msg, msg_info)

if modules_without_error:
_logger.error('Please remove this module names from the white list of this current test: %r', modules_without_error)
_logger.error('Please remove this module names from the white list of this current test: %r', sorted(modules_without_error))

class CompRegexTest(common.TransactionCase):
def test_comp_regex(self):
Expand Down

0 comments on commit eb00051

Please sign in to comment.