Skip to content

Commit

Permalink
[FIX] base_rest: restoring the component_database provoked fails with…
Browse files Browse the repository at this point in the history
… other modules
  • Loading branch information
etobella committed Feb 14, 2025
1 parent a4b00be commit 1ab609b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base_rest/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def _setup_registry(class_or_instance):
db_name = get_db_name()

# makes the test component registry available for the db name
class_or_instance._original_component_databases = _component_databases.get(
db_name
)
_component_databases[db_name] = class_or_instance.comp_registry

# makes the test service registry available for the db name
Expand Down Expand Up @@ -145,7 +148,7 @@ def _teardown_registry(class_or_instance):
class_or_instance._controller_children_classes
)
db_name = get_db_name()
_component_databases[db_name] = class_or_instance._original_components
_component_databases[db_name] = class_or_instance._original_component_databases
_rest_services_databases[
db_name
] = class_or_instance._original_services_registry
Expand Down

0 comments on commit 1ab609b

Please sign in to comment.