1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-21 20:38:22 +02:00

Cover also settings files, keep 100% coverage by ignoring production files

This commit is contained in:
Yohann D'ANELLO
2020-11-03 19:13:33 +01:00
parent fa368a399a
commit 1ddf39f296
11 changed files with 75 additions and 35 deletions

View File

@ -58,11 +58,11 @@ class Registration(PolymorphicModel):
self.user.email_user(subject, message, html_message=html)
@property
def type(self):
def type(self): # pragma: no cover
raise NotImplementedError
@property
def form_class(self):
def form_class(self): # pragma: no cover
raise NotImplementedError
@property

View File

@ -335,8 +335,3 @@ class TestRegistration(TestCase):
attr = CustomAuthUser(self.user.username).attributs()
self.assertEqual(attr["matrix_username"], self.user.registration.matrix_username)
self.assertEqual(attr["display_name"], str(self.user.registration))
def test_not_implemented_error(self):
# Only for coverage
self.assertRaises(NotImplementedError, lambda: Registration().type)
self.assertRaises(NotImplementedError, lambda: Registration().form_class)