

def test_account_exception_raised_for_runtime_error(self):
    user = UserFactory()
    source = AccountFactory(credit_limit=None)
    destination = AccountFactory()
    with mock.patch('oscar_accounts.abstract_models.PostingManager._wrap') as mock_method:
        mock_method.side_effect = RuntimeError()
        with self.assertRaises(exceptions.AccountException):
            facade.transfer(source, user, D('100'), user)

dataset/ETHPy150Open django-oscar/django-oscar-accounts/tests/unit/facade_tests.py TestErrorHandling.test_account_exception_raised_for_runtime_error/VarMisuse@69/108 `destination`->`user`