Ejemplo n.º 1
0
    def test_registration_cosplay_email(self):
        optiongroup1 = EventDatabase.new_optiongroup(self.event)
        option1 = EventDatabase.new_option(optiongroup1, id=settings.COSPLAY_EMAIL_OPTIONS[0])

        optiongroup2 = EventDatabase.new_optiongroup(self.event)
        option2 = EventDatabase.new_option(optiongroup2, id=settings.COSPLAY_EMAIL_OPTIONS[1])

        post_data = Fixtures.valid_registration.copy()
        post_data[OptionGroupForm._get_id(option1)] = 'true'
        post_data[OptionGroupForm._get_id(option2)] = 'true'

        resp = self.client.post(reverse('avacon_registration'), post_data, follow=True)

        self.assertEqual(resp.status_code, 200)

        messages = Message.objects.all()

        self.assertEqual(len(messages), 2)
Ejemplo n.º 2
0
    def test_registration_gopher_email(self):
        optiongroup = EventDatabase.new_optiongroup(self.event)
        option = EventDatabase.new_option(optiongroup, id=settings.GOPHER_EMAIL_OPTION)

        post_data = Fixtures.valid_registration.copy()
        post_data[OptionGroupForm._get_id(option)] = 'true'

        resp = self.client.post(reverse('avacon_registration'), post_data, follow=True)

        self.assertEqual(resp.status_code, 200)

        messages = Message.objects.all()

        self.assertEqual(len(messages), 2)