mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
refactor: replace isort, black and flake8 with ruff (#1346)
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run
This commit is contained in:
parent
5279fd372a
commit
f100cc1836
128 changed files with 3076 additions and 2599 deletions
|
@ -2,8 +2,9 @@ from django.template import Context, Template
|
|||
from pytest_django.asserts import assertHTMLEqual
|
||||
|
||||
from django_components import Component, register, types
|
||||
from django_components.extensions.debug_highlight import apply_component_highlight, COLORS
|
||||
from django_components.extensions.debug_highlight import COLORS, apply_component_highlight
|
||||
from django_components.testing import djc_test
|
||||
|
||||
from .testutils import setup_test_config
|
||||
|
||||
setup_test_config({"autodiscover": False})
|
||||
|
@ -87,7 +88,7 @@ class TestComponentHighlight:
|
|||
"extensions_defaults": {
|
||||
"debug_highlight": {"highlight_components": True},
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
def test_component_highlight_extension(self):
|
||||
template = _prepare_template()
|
||||
|
@ -232,7 +233,7 @@ class TestComponentHighlight:
|
|||
"extensions_defaults": {
|
||||
"debug_highlight": {"highlight_slots": True},
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
def test_slot_highlight_extension(self):
|
||||
template = _prepare_template()
|
||||
|
@ -399,12 +400,14 @@ class TestComponentHighlight:
|
|||
highlight_components = True
|
||||
highlight_slots = True
|
||||
|
||||
template = Template("""
|
||||
template = Template(
|
||||
"""
|
||||
{% load component_tags %}
|
||||
{% component "inner" %}
|
||||
{{ content }}
|
||||
{% endcomponent %}
|
||||
""")
|
||||
""",
|
||||
)
|
||||
rendered = template.render(Context({"content": "Hello, world!"}))
|
||||
|
||||
expected = """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue