specter-desktop/tests/test_ep_wallet_api.py
Kim Neunert 8742e9f75f
Feature: Send dialog refactored and sped up (#1454)
* Feature: time measuring for RPC-tracing

* Performance warnings and hints

* adjust treshold to 7 seconds

* refactor api wallets endpoints to own file

* more consistent error-handling

* fee endpoint

* refactoring tx-table to hide columns and add customaction

* replace coin_selection with webcomponent

* fix fee-test

* fix fee-test

* fix fee-estimation

* fee selection web-component

* bugfixes

* fix test

* using events to communicate changes

* tidy up

* fix selectedCoins

* fix tests

* no fee_rate calc in send_new endpoint
and GET for fetchAssetBalances

* refactor estimate_fee out from send_new

* fix assetLabel

* Do not use assetBalances-endpoint but pass as property

* Typos corrected, RBF functionality restored, bugs in fee selection fixed and fee default settings improved.

Co-authored-by: moneymanolis <moneymanolis@protonmail.com>
Co-authored-by: Manolis <70536101+moneymanolis@users.noreply.github.com>
2022-01-13 09:38:44 +01:00

34 lines
969 B
Python

import logging
import pytest
import json
def test_fees(caplog, client):
"""The root of the app"""
caplog.set_level(logging.INFO)
caplog.set_level(logging.DEBUG, logger="cryptoadvance.specter")
login(client, "secret")
result = client.get("/wallets/fees")
assert result.status_code == 200
my_dict = json.loads(result.data)
assert my_dict["result"]["fastestFee"] == 1
assert my_dict["error_messages"] == []
logout(client)
# Ugly: Code duplication. Cannot import from other test_modules
def login(client, password):
"""login helper-function"""
result = client.post(
"auth/login", data=dict(password=password), follow_redirects=True
)
assert (
b"We could not check your password, maybe Bitcoin Core is not running or not configured?"
not in result.data
)
return result
def logout(client):
"""logout helper-method"""
return client.get("auth/logout", follow_redirects=True)