Example #1
0
class TestVerificationResponse(unittest.TestCase):
    def setUp(self):
        """Call before every test case."""

        self.response = VerificationResponse(
            True, 'rejection reason', Identity(), '2014-1-1', True, True,
            True, False)

    def test_verification_response_property_accepted(self):
        self.assertTrue(self.response.accepted)

    def test_verification_response_to_json(self):
        self.response.to_json()

    def test_verification_response_to_dict(self):
        self.assertEquals(self.response.to_dict()['expiration_date'],
                          '2014-1-1')
Example #2
0
class TestVerificationResponse(unittest.TestCase):
    def setUp(self):
        """Call before every test case."""

        self.response = VerificationResponse(True, 'rejection reason',
                                             Identity(), '2014-1-1', True,
                                             True, True, False)

    def test_verification_response_property_accepted(self):
        self.assertTrue(self.response.accepted)

    def test_verification_response_to_json(self):
        self.response.to_json()

    def test_verification_response_to_dict(self):
        self.assertEquals(self.response.to_dict()['expiration_date'],
                          '2014-1-1')