Commit 1eb29b00 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg

Fix tests

parent 603d5238
......@@ -44,8 +44,8 @@ class RegistrationApiTest(TestCase):
def test_registration_register_not_required(self):
response = self.client.post('/api/v1/events/1/registrations/',
follow=True)
self.assertEqual(response.status_code, 403)
self.assertEqual(self.event.participants.count(), 0)
self.assertEqual(response.status_code, 201)
self.assertEqual(self.event.participants.count(), 1)
def test_registration_register(self):
self.event.registration_start = (timezone.now() -
......
......@@ -196,7 +196,7 @@ class EventTest(TestCase):
self.event.registration_start = None
self.event.registration_end = None
self.event.cancel_deadline = None
self.assertFalse(self.event.registration_allowed)
self.assertTrue(self.event.registration_allowed)
def test_missing_orgination_mailinglist(self):
self.event.clean()
......@@ -269,7 +269,7 @@ class EventTest(TestCase):
self.event.registration_start = None
self.event.registration_end = None
self.event.cancel_deadline = None
self.assertFalse(self.event.cancellation_allowed)
self.assertTrue(self.event.cancellation_allowed)
class RegistrationTest(TestCase):
......
......@@ -168,7 +168,7 @@ class RegistrationTest(TestCase):
response = self.client.post('/events/1/registration/register/',
follow=True)
self.assertEqual(response.status_code, 200)
self.assertEqual(self.event.participants.count(), 0)
self.assertEqual(self.event.participants.count(), 1)
def test_registration_register(self):
self.event.registration_start = (timezone.now() -
......
Markdown is supported
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