mirror of
https://github.com/django-components/django-components.git
synced 2025-08-30 18:57:20 +00:00
Reformat lines that became too long. And enforce 119 line length.
This commit is contained in:
parent
ef6a082238
commit
48fe8171b4
25 changed files with 314 additions and 733 deletions
|
@ -27,9 +27,7 @@ class ComponentRegistryTest(unittest.TestCase):
|
|||
class TestComponent(component.Component):
|
||||
pass
|
||||
|
||||
self.assertEqual(
|
||||
component.registry.get("decorated_component"), TestComponent
|
||||
)
|
||||
self.assertEqual(component.registry.get("decorated_component"), TestComponent)
|
||||
|
||||
def test_simple_register(self):
|
||||
self.registry.register(name="testcomponent", component=MockComponent)
|
||||
|
@ -49,18 +47,12 @@ class ComponentRegistryTest(unittest.TestCase):
|
|||
def test_prevent_registering_different_components_with_the_same_name(self):
|
||||
self.registry.register(name="testcomponent", component=MockComponent)
|
||||
with self.assertRaises(component.AlreadyRegistered):
|
||||
self.registry.register(
|
||||
name="testcomponent", component=MockComponent2
|
||||
)
|
||||
self.registry.register(name="testcomponent", component=MockComponent2)
|
||||
|
||||
def test_allow_duplicated_registration_of_the_same_component(self):
|
||||
try:
|
||||
self.registry.register(
|
||||
name="testcomponent", component=MockComponentView
|
||||
)
|
||||
self.registry.register(
|
||||
name="testcomponent", component=MockComponentView
|
||||
)
|
||||
self.registry.register(name="testcomponent", component=MockComponentView)
|
||||
self.registry.register(name="testcomponent", component=MockComponentView)
|
||||
except component.AlreadyRegistered:
|
||||
self.fail("Should not raise AlreadyRegistered")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue