Add test for register_eav decorator

This commit is contained in:
Iwo Herka 2018-07-13 11:59:45 +00:00
parent 23be8b41a9
commit 89f67a11ae

View file

@ -75,3 +75,9 @@ class RegistryTests(TestCase):
def test_double_registering_model_is_harmless(self):
eav.register(Patient)
eav.register(Patient)
def test_doesnt_register_nonmodel(self):
with self.assertRaises(ValueError):
@eav.decorators.register_eav()
class Foo(object):
pass