This commit is contained in:
@@ -4,7 +4,7 @@ from ..models import Registration
|
||||
THIS_YEAR = timezone.now().year
|
||||
|
||||
|
||||
class RegistrationMixin(object):
|
||||
class RegistrationMixin: # pylint: disable=too-few-public-methods
|
||||
def create_registration(self, data):
|
||||
r = Registration(**data)
|
||||
r.save()
|
||||
|
||||
@@ -95,7 +95,7 @@ Zeitpunkt der Datenlöschung: {purge_at}
|
||||
|
||||
class EmailsTestCase(EmailTestMixin, EventMixin, RegistrationMixin, TestCase):
|
||||
def setUp(self):
|
||||
super(EmailsTestCase, self).setUp()
|
||||
super().setUp()
|
||||
|
||||
app_config = apps.get_app_config('dav_events')
|
||||
app_config.settings.enable_email_on_status_update = False
|
||||
|
||||
@@ -11,7 +11,7 @@ from .generic import THIS_YEAR, RegistrationMixin
|
||||
|
||||
class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
|
||||
def setUp(self):
|
||||
super(RegistrationTestCase, self).setUp()
|
||||
super().setUp()
|
||||
|
||||
app_config = apps.get_app_config('dav_events')
|
||||
app_config.settings.enable_email_on_status_update = False
|
||||
@@ -100,4 +100,3 @@ class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
|
||||
'dav_member': False,
|
||||
}
|
||||
self.create_registration(registration_data)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class UtilsTestCase(RegistrationMixin, EventMixin, TestCase):
|
||||
self.submit_event(event)
|
||||
self.accept_event(event)
|
||||
|
||||
for i in range(0, registrations_per_event):
|
||||
for _ in range(0, registrations_per_event):
|
||||
d = registration_data
|
||||
d['event'] = event
|
||||
self.create_registration(d)
|
||||
|
||||
Reference in New Issue
Block a user