Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] component_event: fix test base class #461

Closed
wants to merge 1 commit into from

Conversation

simahawk
Copy link
Contributor

@simahawk simahawk commented Mar 1, 2023

There's no reason for these tests to depend on BaseCase but we cannot depend on unittest.TestCase
because Odoo's test suite runner expects to find some attributes on the test class which come from BaseCase.

 Traceback (most recent call last):
  File "/opt/odoo/odoo/service/server.py", line 1299, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "<decorator-gen-14>", line 2, in new
  File "/opt/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/opt/odoo/odoo/modules/registry.py", line 90, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/opt/odoo/odoo/modules/loading.py", line 487, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/opt/odoo/odoo/modules/loading.py", line 371, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/opt/odoo/odoo/modules/loading.py", line 281, in load_module_graph
    suite = loader.make_suite([module_name], 'at_install')
  File "/opt/odoo/odoo/tests/loader.py", line 55, in make_suite
    return OdooSuite(sorted(tests, key=lambda t: t.test_sequence))
  File "/opt/odoo/odoo/tests/loader.py", line 53, in <genexpr>
    if position_tag.check(t) and config_tags.check(t)
  File "/opt/odoo/odoo/tests/tag_selector.py", line 54, in check
    test_module = test.test_module
``

there's no reason for these tests to depend on BaseCase
but we cannot depend on
because Odoo's test suite runner expects to find some attributes on the test class
which come from
@simahawk
Copy link
Contributor Author

simahawk commented Mar 1, 2023

Dammit, seems related to this big refactoring merged yesterday 😭
odoo/odoo@9a5d1ea

@simahawk
Copy link
Contributor Author

simahawk commented Mar 1, 2023

This change is not needed if they accept my fix here odoo/odoo#114007

@simahawk simahawk closed this Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant