[CHORE] flake8 issues E402, E721 and F821 (#1874)
* F821: undefine name disabled and logged webhook_listener for opennode and lnpay because they are obviously not working * E402: module level import not at top of file * E721 fixes, only popped up for python3.9 not 3.10
This commit is contained in:
parent
355806608b
commit
f0a66e41fb
13 changed files with 108 additions and 112 deletions
|
|
@ -9,4 +9,4 @@ from lnbits.db import POSTGRES
|
|||
async def test_date_conversion(db):
|
||||
if db.type == POSTGRES:
|
||||
row = await db.fetchone("SELECT now()::date")
|
||||
assert row and type(row[0]) == date
|
||||
assert row and isinstance(row[0], date)
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ async def test_decode_invoice(client, invoice):
|
|||
async def test_api_payment_without_key(invoice):
|
||||
# check the payment status
|
||||
response = await api_payment(invoice["payment_hash"])
|
||||
assert type(response) == dict
|
||||
assert isinstance(response, dict)
|
||||
assert response["paid"] is True
|
||||
# no key, that's why no "details"
|
||||
assert "details" not in response
|
||||
|
|
@ -298,7 +298,7 @@ async def test_api_payment_with_key(invoice, inkey_headers_from):
|
|||
response = await api_payment(
|
||||
invoice["payment_hash"], inkey_headers_from["X-Api-Key"]
|
||||
)
|
||||
assert type(response) == dict
|
||||
assert isinstance(response, dict)
|
||||
assert response["paid"] is True
|
||||
assert "details" in response
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue