コード例 #1
0
    def resolve_request(request_id, response):
        """ resolve a verification request

        :param request_id: the request id
        :param response: a VerificationResponse object
        """
        api.verifier_resolve_request(request_id, response.to_dict())
コード例 #2
0
ファイル: test_api.py プロジェクト: zukobronja/vote
    def test_api_verifier_resolve_request(self):
        create_request()
        verify_request = Identity(api.take_next_request()['result'])

        today = datetime.combine(date.today(), datetime.min.time())
        x = VerificationResponse(True, None, verify_request, today.isoformat(),
                                 True, True, True, True)

        response = api.verifier_resolve_request(verify_request.id, x.to_dict())
        self.assertFalse("error" in response)

        create_request()
        verify_request = Identity(api.take_next_request()['result'])
        x = VerificationResponse(False, "this is the rejection reason",
                                 verify_request, None, True, True, False, True)

        response = api.verifier_resolve_request(verify_request.id, x.to_dict())
        self.assertFalse("error" in response)
コード例 #3
0
ファイル: test_api.py プロジェクト: driver4567/vote
    def test_api_verifier_resolve_request(self):
        create_request()
        verify_request = Identity(api.take_next_request()['result'])

        today = datetime.combine(date.today(), datetime.min.time())
        x = VerificationResponse(True, None, verify_request, today.isoformat(),
                                 True, True, True, True)

        response = api.verifier_resolve_request(verify_request.id, x.to_dict())
        self.assertFalse("error" in response)

        create_request()
        verify_request = Identity(api.take_next_request()['result'])
        x = VerificationResponse(False, "this is the rejection reason",
                                 verify_request, None, True, True, False, True)

        response = api.verifier_resolve_request(verify_request.id, x.to_dict())
        self.assertFalse("error" in response)