async def test_create_exchange_for_request(self):
    request = async_mock.MagicMock()
    request.indy_proof_request = async_mock.MagicMock()
    request._thread_id = 'dummy'
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex:
        px_rec = (await self.manager.create_exchange_for_request(CONN_ID, request))
        save_ex.assert_called_once()
        assert (px_rec.thread_id == request._thread_id)
        assert (px_rec.initiator == V20PresExRecord.INITIATOR_SELF)
        assert (px_rec.role == V20PresExRecord.ROLE_VERIFIER)
        assert (px_rec.state == V20PresExRecord.STATE_REQUEST_SENT)
async def test_create_exchange_for_request(self):
    request = async_mock.MagicMock()
    request.indy_proof_request = async_mock.MagicMock()
    request._thread_id = 'dummy'
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex:
        px_rec = (await self.manager.create_exchange_for_request(CONN_ID, request))
        save_ex.assert_called_once()
        assert (px_rec.thread_id == request._thread_id)
        assert (px_rec.initiator == V20PresExRecord.INITIATOR_SELF)
        assert (px_rec.role == V20PresExRecord.ROLE_VERIFIER)
        assert (px_rec.state == V20PresExRecord.STATE_REQUEST_SENT)