Example #1
0
    def test_get_by_rsvp_code(self):
        rsvp_code_no = self.application.get_rsvp_no_code()
        rsvp_code_yes = self.application.get_rsvp_yes_code()

        self.assertEqual(Application.get_by_rsvp_code(rsvp_code_yes, self.page), (self.application, 'yes'))
        self.assertEqual(Application.get_by_rsvp_code(rsvp_code_no, self.page), (self.application, 'no'))
        self.assertIsNone(Application.get_by_rsvp_code('notexisting', self.page))
Example #2
0
    def test_get_by_rsvp_code(self):
        rsvp_code_no = self.application.get_rsvp_no_code()
        rsvp_code_yes = self.application.get_rsvp_yes_code()

        self.assertEqual(Application.get_by_rsvp_code(rsvp_code_yes, self.page), (self.application, 'yes'))
        self.assertEqual(Application.get_by_rsvp_code(rsvp_code_no, self.page), (self.application, 'no'))
        self.assertEqual(Application.get_by_rsvp_code('notexisting', self.page), (None, None))
def test_get_by_rsvp_code(application, event):
    rsvp_code_no = application.get_rsvp_no_code()
    rsvp_code_yes = application.get_rsvp_yes_code()

    assert (Application.get_by_rsvp_code(rsvp_code_yes,
                                         event) == (application, 'yes'))
    assert (Application.get_by_rsvp_code(rsvp_code_no,
                                         event) == (application, 'no'))
    assert (Application.get_by_rsvp_code('notexisting', event) == (None, None))
def test_get_by_rsvp_code(application, event):
    rsvp_code_no = application.get_rsvp_no_code()
    rsvp_code_yes = application.get_rsvp_yes_code()

    assert (
        Application.get_by_rsvp_code(rsvp_code_yes, event) ==
        (application, 'yes'))
    assert (
        Application.get_by_rsvp_code(rsvp_code_no, event) ==
        (application, 'no'))
    assert (
        Application.get_by_rsvp_code('notexisting', event) ==
        (None, None))