def test_transfers_one(): key = 'idempotency_key_1' transfer: Transfer = Transfer.one(idempotency_key=key) assert transfer.idempotency_key == key
def test_transfers_one_errors(): with pytest.raises(NoResultFound): Transfer.one(idempotency_key='wrong_key') with pytest.raises(MultipleResultsFound): Transfer.one(status=TransactionStatus.submitted)
def test_invalid_params(): with pytest.raises(ValidationError) as e: Transfer.one(invalid_param='invalid_param') assert 'extra fields not permitted' in str(e)