Commit 32963325 authored by Milan van Stiphout's avatar Milan van Stiphout
Browse files

Added test and fixed test setup data to have fine=5

parent 1df88c82
......@@ -28,7 +28,7 @@ class EventTest(TestCase):
location_nl='test locatie',
map_location='test map location',
price=0.00,
fine=0.00)
fine=5.00)
cls.member = Member.objects.all()[0]
def setUp(self):
......@@ -157,6 +157,19 @@ class EventTest(TestCase):
Registration.objects.create(event=self.event, member=self.member)
self.assertTrue(self.event.reached_participants_limit())
def test_registration_fine_required(self):
self.event.registration_start = (timezone.now() -
datetime.timedelta(hours=1))
self.event.registration_end = (timezone.now() +
datetime.timedelta(hours=1))
self.event.cancel_deadline = (timezone.now() -
datetime.timedelta(hours=1))
self.event.clean()
self.event.fine = 0
with self.assertRaises(ValidationError):
self.event.clean()
class RegistrationTest(TestCase):
"""Tests event registrations"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment