satisfy tests
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2020-12-09 13:16:37 +01:00
parent 0ff559d548
commit c3bbaa7200
4 changed files with 28 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ from django.test import TestCase
from dav_events.tests.generic import EventMixin
from .generic import RegistrationMixin
from .generic import THIS_YEAR, RegistrationMixin
class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
@@ -32,6 +32,7 @@ class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
'city': 'Karlsruhe',
'phone_number': '12',
'email_address': 'participant@localhost',
'year_of_birth': THIS_YEAR,
}
dav_numbers = ['0', '12345', '131/00/12345']
for n in dav_numbers:
@@ -50,6 +51,7 @@ class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
'city': 'Karlsruhe',
'phone_number': '12',
'email_address': 'participant@localhost',
'year_of_birth': THIS_YEAR,
}
with self.assertRaisesMessage(ValidationError,
'Wenn du DAV Mitglied bist, brauchen wir deine Mitgliedsnummer.'):
@@ -71,6 +73,7 @@ class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
'city': 'Karlsruhe',
'phone_number': '12',
'email_address': 'participant@localhost',
'year_of_birth': THIS_YEAR,
}
dav_numbers = ['Nein', '-', '13100123456789']
for n in dav_numbers:
@@ -93,6 +96,7 @@ class RegistrationTestCase(EventMixin, RegistrationMixin, TestCase):
'city': 'Karlsruhe',
'phone_number': '12',
'email_address': 'participant@localhost',
'year_of_birth': THIS_YEAR,
'dav_member': False,
}
self.create_registration(registration_data)