@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user