mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
* 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>
34 lines
969 B
Python
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)
|