async def test_create_exchange_for_proposal(self):
    proposal = V20PresProposal()
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex, async_mock.patch.object(V20PresProposal, 'serialize', autospec=True):
        px_rec = (await self.manager.create_exchange_for_proposal(CONN_ID, proposal, auto_present=None))
        save_ex.assert_called_once()
        assert (px_rec.thread_id == proposal._thread_id)
        assert (px_rec.initiator == V20PresExRecord.INITIATOR_SELF)
        assert (px_rec.role == V20PresExRecord.ROLE_PROVER)
        assert (px_rec.state == V20PresExRecord.STATE_PROPOSAL_SENT)
async def test_create_exchange_for_proposal(self):
    proposal = V20PresProposal()
    with async_mock.patch.object(V20PresExRecord, 'save', autospec=True) as save_ex, async_mock.patch.object(V20PresProposal, 'serialize', autospec=True):
        px_rec = (await self.manager.create_exchange_for_proposal(CONN_ID, proposal, auto_present=None))
        save_ex.assert_called_once()
        assert (px_rec.thread_id == proposal._thread_id)
        assert (px_rec.initiator == V20PresExRecord.INITIATOR_SELF)
        assert (px_rec.role == V20PresExRecord.ROLE_PROVER)
        assert (px_rec.state == V20PresExRecord.STATE_PROPOSAL_SENT)