async def test_create_pres_no_revocation(self):
    Ledger = async_mock.MagicMock(BaseLedger, autospec=True)
    self.ledger = Ledger()
    self.ledger.get_schema = async_mock.CoroutineMock(return_value=async_mock.MagicMock())
    self.ledger.get_credential_definition = async_mock.CoroutineMock(return_value={'value': {'revocation': None}})
    self.profile.context.injector.bind_instance(BaseLedger, self.ledger)
    pres_request = V20PresRequest(formats=[V20PresFormat(attach_id='indy', format_=ATTACHMENT_FORMAT[PRES_20_REQUEST][V20PresFormat.Format.INDY.api])], request_presentations_attach=[AttachDecorator.data_base64(INDY_PROOF_REQ_NAME, ident='indy')])
    px_rec_in = V20PresExRecord(pres_request=pres_request.serialize())
    Holder = async_mock.MagicMock(IndyHolder, autospec=True)
    self.holder = Holder()
    get_creds = async_mock.CoroutineMock(return_value=({'cred_info': {'referent': 'dummy_reft'}, 'attrs': {'player': 'Richie Knucklez', 'screenCapture': 'aW1hZ2luZSBhIHNjcmVlbiBjYXB0dXJl', 'highScore': '1234560'}},))
    self.holder.get_credentials_for_presentation_request_by_referent = get_creds
    self.holder.get_credential = async_mock.CoroutineMock(return_value=json.dumps({'schema_id': S_ID, 'cred_def_id': CD_ID, 'rev_reg_id': None, 'cred_rev_id': None}))
    self.holder.create_presentation = async_mock.CoroutineMock(return_value='{}')
    self.profile.context.injector.bind_instance(IndyHolder, self.holder)
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex, async_mock.patch.object(test_module, 'AttachDecorator', autospec=True) as mock_attach_decorator, async_mock.patch.object(test_module.LOGGER, 'info', async_mock.MagicMock()) as mock_log_info:
        mock_attach_decorator.data_base64 = async_mock.MagicMock(return_value=mock_attach_decorator)
        req_creds = (await indy_proof_req_preview2indy_requested_creds(INDY_PROOF_REQ_NAME, preview=None, holder=self.holder))
        (px_rec_out, pres_msg) = (await self.manager.create_pres(px_rec_in, req_creds))
        save_ex.assert_called_once()
        assert (px_rec_out.state == V20PresExRecord.STATE_PRESENTATION_SENT)
        for pred_reft_spec in req_creds['requested_predicates'].values():
            pred_reft_spec['timestamp'] = 1234567890
        (await self.manager.create_pres(px_rec_in, req_creds))
        mock_log_info.assert_called_once()
async def test_create_pres_no_revocation(self):
    Ledger = async_mock.MagicMock(BaseLedger, autospec=True)
    self.ledger = Ledger()
    self.ledger.get_schema = async_mock.CoroutineMock(return_value=async_mock.MagicMock())
    self.ledger.get_credential_definition = async_mock.CoroutineMock(return_value={'value': {'revocation': None}})
    self.profile.context.injector.bind_instance(BaseLedger, self.ledger)
    pres_request = V20PresRequest(formats=[V20PresFormat(attach_id='indy', format_=ATTACHMENT_FORMAT[PRES_20_REQUEST][V20PresFormat.Format.INDY.api])], request_presentations_attach=[AttachDecorator.data_base64(INDY_PROOF_REQ_NAME, ident='indy')])
    px_rec_in = V20PresExRecord(pres_request=pres_request.serialize())
    Holder = async_mock.MagicMock(IndyHolder, autospec=True)
    self.holder = Holder()
    get_creds = async_mock.CoroutineMock(return_value=({'cred_info': {'referent': 'dummy_reft'}, 'attrs': {'player': 'Richie Knucklez', 'screenCapture': 'aW1hZ2luZSBhIHNjcmVlbiBjYXB0dXJl', 'highScore': '1234560'}},))
    self.holder.get_credentials_for_presentation_request_by_referent = get_creds
    self.holder.get_credential = async_mock.CoroutineMock(return_value=json.dumps({'schema_id': S_ID, 'cred_def_id': CD_ID, 'rev_reg_id': None, 'cred_rev_id': None}))
    self.holder.create_presentation = async_mock.CoroutineMock(return_value='{}')
    self.profile.context.injector.bind_instance(IndyHolder, self.holder)
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex, async_mock.patch.object(test_module, 'AttachDecorator', autospec=True) as mock_attach_decorator, async_mock.patch.object(test_module.LOGGER, 'info', async_mock.MagicMock()) as mock_log_info:
        mock_attach_decorator.data_base64 = async_mock.MagicMock(return_value=mock_attach_decorator)
        req_creds = (await indy_proof_req_preview2indy_requested_creds(INDY_PROOF_REQ_NAME, preview=None, holder=self.holder))
        (px_rec_out, pres_msg) = (await self.manager.create_pres(px_rec_in, req_creds))
        save_ex.assert_called_once()
        assert (px_rec_out.state == V20PresExRecord.STATE_PRESENTATION_SENT)
        for pred_reft_spec in req_creds['requested_predicates'].values():
            pred_reft_spec['timestamp'] = 1234567890
        (await self.manager.create_pres(px_rec_in, req_creds))
        mock_log_info.assert_called_once()