mirror of
https://github.com/django-components/django-components.git
synced 2025-08-30 18:57:20 +00:00
parent
7a49a7806c
commit
f069255b64
12 changed files with 404 additions and 72 deletions
|
@ -322,7 +322,8 @@ class TestComponentRenderAPI:
|
|||
assert self.input.kwargs == {"variable": "test", "another": 1}
|
||||
assert isinstance(self.input.context, Context)
|
||||
assert list(self.input.slots.keys()) == ["my_slot"]
|
||||
assert self.input.slots["my_slot"](Context(), None, None) == "MY_SLOT"
|
||||
my_slot = self.input.slots["my_slot"]
|
||||
assert my_slot() == "MY_SLOT"
|
||||
|
||||
return {
|
||||
"variable": kwargs["variable"],
|
||||
|
@ -334,7 +335,8 @@ class TestComponentRenderAPI:
|
|||
assert self.input.kwargs == {"variable": "test", "another": 1}
|
||||
assert isinstance(self.input.context, Context)
|
||||
assert list(self.input.slots.keys()) == ["my_slot"]
|
||||
assert self.input.slots["my_slot"](Context(), None, None) == "MY_SLOT"
|
||||
my_slot = self.input.slots["my_slot"]
|
||||
assert my_slot() == "MY_SLOT"
|
||||
|
||||
template_str: types.django_html = """
|
||||
{% load component_tags %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue