def delete_account(client_id, account_id): try: AccountService.delete_account(client_id, account_id) return '', 204 except ValueError as e: return "Incorrect value type", 400 except ResourceNotFound as r: return r.message, 404
def delete_accounts(userid, accounts_id): try: if UserService.get_user(userid): AccountService.get_account_id(accounts_id) AccountService.delete_account(accounts_id) return '', 204 except ResourceNotFound as rf: rf.message return "Account does not exist", 404
def delete_account(client_id, account_id): try: account = Account(int(account_id), "", 0, int(client_id)) account = AccountService.delete_account(account) return jsonify(account.json() ), 205 # 205 if success && 404 if no such account except ResourceNotFound as r: return r.message, 404
def test_99_delete(self): response = AccountService.delete_account(1, AccountServiceTest.account.id) self.assertEqual(response[1], 204)
def del_account(cl_id, account_id): AccountService.delete_account(int(account_id)) return '', 204
def delete_account(client_id, account_id): return AccountService.delete_account(client_id, account_id)