mirror of
https://github.com/django-components/django-components.git
synced 2025-12-09 22:11:06 +00:00
refactor: usage notes + tests for safer_staticfiles (#538)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
3dadba6636
commit
23d91218bd
13 changed files with 226 additions and 4 deletions
|
|
@ -770,7 +770,14 @@ class MediaRelativePathTests(BaseTestCase):
|
|||
|
||||
# Fix the paths, since the "components" dir is nested
|
||||
with autodiscover_with_cleanup(map_import_paths=lambda p: f"tests.{p}"):
|
||||
component.registry.unregister("relative_file_pathobj_component")
|
||||
# Make sure that only relevant components are registered:
|
||||
comps_to_remove = [
|
||||
comp_name
|
||||
for comp_name in component.registry.all()
|
||||
if comp_name not in ["relative_file_component", "parent_component", "variable_display"]
|
||||
]
|
||||
for comp_name in comps_to_remove:
|
||||
component.registry.unregister(comp_name)
|
||||
|
||||
template_str: types.django_html = """
|
||||
{% load component_tags %}{% component_dependencies %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue