diff --git a/src/django_components/util/testing.py b/src/django_components/util/testing.py index 24ecb3dd..9a839e0e 100644 --- a/src/django_components/util/testing.py +++ b/src/django_components/util/testing.py @@ -2,7 +2,21 @@ import gc import inspect import sys from functools import wraps -from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Sequence, Set, Tuple, Type, Union +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Dict, + Iterable, + List, + Mapping, + Optional, + Sequence, + Set, + Tuple, + Type, + Union, +) from unittest.mock import patch from weakref import ReferenceType @@ -406,7 +420,6 @@ def djc_test( return decorator - def _merge_django_settings( django_settings: Optional[Mapping[str, Any]] = None, components_settings: Optional[Union[Mapping[str, Any], "ComponentsSettings"]] = None, @@ -436,6 +449,7 @@ def _components_to_mapping( return dict(value._asdict()) raise TypeError("COMPONENTS must be a mapping or ComponentsSettings") + def _setup_djc_global_state( gen_id_patcher: GenIdPatcher, csrf_token_patcher: CsrfTokenPatcher,