mirror of
https://github.com/django-components/django-components.git
synced 2025-11-25 08:21:20 +00:00
Clear global component.registry before each test.
This commit is contained in:
parent
a2e829f8af
commit
57286f8389
1 changed files with 4 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ class SimpleComponent(component.Component):
|
|||
js = ("script.js",)
|
||||
|
||||
class ComponentTemplateTagTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
# NOTE: component.registry is global, so need to clear before each test
|
||||
component.registry._registry = {}
|
||||
|
||||
def test_component_dependencies(self):
|
||||
component.registry.register(name="test", component=SimpleComponent)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue