async def setUp(self):
    self.profile = InMemoryProfile.test_profile()
    injector = self.profile.context.injector
    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': {'...': '...'}}})
    self.ledger.get_revoc_reg_def = async_mock.CoroutineMock(return_value={'ver': '1.0', 'id': RR_ID, 'revocDefType': 'CL_ACCUM', 'tag': RR_ID.split(':')[(- 1)], 'credDefId': CD_ID, 'value': {'IssuanceType': 'ISSUANCE_BY_DEFAULT', 'maxCredNum': 1000, 'publicKeys': {'accumKey': {'z': '1 ...'}}, 'tailsHash': 'EXAMPLE_KEY', 'tailsLocation': 'http://sample.ca/path'}})
    self.ledger.get_revoc_reg_delta = async_mock.CoroutineMock(return_value=({'ver': '1.0', 'value': {'prevAccum': '1 ...', 'accum': '21 ...', 'issued': [1]}}, NOW))
    self.ledger.get_revoc_reg_entry = async_mock.CoroutineMock(return_value=({'ver': '1.0', 'value': {'prevAccum': '1 ...', 'accum': '21 ...', 'issued': [1]}}, NOW))
    injector.bind_instance(BaseLedger, self.ledger)
    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': RR_ID, 'cred_rev_id': 1}))
    self.holder.create_presentation = async_mock.CoroutineMock(return_value='{}')
    self.holder.create_revocation_state = async_mock.CoroutineMock(return_value=json.dumps({'witness': {'omega': '1 ...'}, 'rev_reg': {'accum': '21 ...'}, 'timestamp': NOW}))
    injector.bind_instance(IndyHolder, self.holder)
    Verifier = async_mock.MagicMock(IndyVerifier, autospec=True)
    self.verifier = Verifier()
    self.verifier.verify_presentation = async_mock.CoroutineMock(return_value='true')
    injector.bind_instance(IndyVerifier, self.verifier)
    self.manager = V20PresManager(self.profile)
async def setUp(self):
    self.profile = InMemoryProfile.test_profile()
    injector = self.profile.context.injector
    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': {'...': '...'}}})
    self.ledger.get_revoc_reg_def = async_mock.CoroutineMock(return_value={'ver': '1.0', 'id': RR_ID, 'revocDefType': 'CL_ACCUM', 'tag': RR_ID.split(':')[(- 1)], 'credDefId': CD_ID, 'value': {'IssuanceType': 'ISSUANCE_BY_DEFAULT', 'maxCredNum': 1000, 'publicKeys': {'accumKey': {'z': '1 ...'}}, 'tailsHash': 'EXAMPLE_KEY', 'tailsLocation': 'http://sample.ca/path'}})
    self.ledger.get_revoc_reg_delta = async_mock.CoroutineMock(return_value=({'ver': '1.0', 'value': {'prevAccum': '1 ...', 'accum': '21 ...', 'issued': [1]}}, NOW))
    self.ledger.get_revoc_reg_entry = async_mock.CoroutineMock(return_value=({'ver': '1.0', 'value': {'prevAccum': '1 ...', 'accum': '21 ...', 'issued': [1]}}, NOW))
    injector.bind_instance(BaseLedger, self.ledger)
    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': RR_ID, 'cred_rev_id': 1}))
    self.holder.create_presentation = async_mock.CoroutineMock(return_value='{}')
    self.holder.create_revocation_state = async_mock.CoroutineMock(return_value=json.dumps({'witness': {'omega': '1 ...'}, 'rev_reg': {'accum': '21 ...'}, 'timestamp': NOW}))
    injector.bind_instance(IndyHolder, self.holder)
    Verifier = async_mock.MagicMock(IndyVerifier, autospec=True)
    self.verifier = Verifier()
    self.verifier.verify_presentation = async_mock.CoroutineMock(return_value='true')
    injector.bind_instance(IndyVerifier, self.verifier)
    self.manager = V20PresManager(self.profile)