mirror of
https://github.com/django-components/django-components.git
synced 2025-10-17 01:07:12 +00:00
Add a basic Component class.
This commit is contained in:
parent
df22a4049f
commit
31261ece08
2 changed files with 26 additions and 0 deletions
14
tests/test_component.py
Normal file
14
tests/test_component.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import unittest
|
||||
from django_components import component
|
||||
|
||||
class ComponentRegistryTest(unittest.TestCase):
|
||||
def test_simple_component(self):
|
||||
class MyComponent(component.Component):
|
||||
pass
|
||||
|
||||
comp = MyComponent()
|
||||
|
||||
self.assertEqual(comp.context(), {})
|
||||
self.assertEqual(comp._media.template, None)
|
||||
self.assertEqual(comp._media.css, {})
|
||||
self.assertEqual(comp._media.js, ())
|
Loading…
Add table
Add a link
Reference in a new issue