lnbits-legend/lnbits/wallets
Vlad Stan bfda0b62da
test: add unit tests for wallets (funding sources) (#2363)
* test: initial commit

* feat: allow external label for `create_invoice` (useful for testing)

* chore: code format

* fix: ignore temp coverage files

* feat: add properties to the Status classes for a better readability

* fix: add extra validation for data

* fix: comment out bad `status.pending` (to be fixed in core)

* fix: 404 tests

* test: first draft of generic rest wallet tests

* test: migrate two more tests

* feat: add response type

* feat: test exceptions

* test: extract first `create_invoice` test

* chore: reminder

* add: error test

* chore: code format

* chore: experiment

* feat: adapt parsing

* refactor: data structure

* fix: some tests

* refactor: extract methods

* fix: make response uniform

* fix: test data

* chore: clean-up

* fix: uniform responses

* fix: user agent

* fix: user agent

* fix: user-agent again

* test: add `with error` test

* feat: customize test name

* fix: better exception handling for `status`

* fix: add `try-catch` for `raise_for_status`

* test: with no mocks

* chore: clean-up generalized tests

* chore: code format

* chore: code format

* chore: remove extracted tests

* test: add `create_invoice`: error test

* add: test for `create_invoice` with http 404

* test: extract `test_pay_invoice_ok`

* test: extract `test_pay_invoice_error_response`

* test: extract `test_pay_invoice_http_404`

* test: add "missing data"

* test: add `bad-json`

* test: add `no mocks` for `create_invoice`

* test: add `no mocks` for `pay_invoice`

* test: add `bad json` tests

* chore: re-order tests

* fix: response type

* test: add `missing data` test for `pay_imvoice`

* chore: re-order tests

* test: add `success` test for `get_invoice_status `

* feat: update test structure

* test: new status

* test: add more test

* fix: error handling

* chore: code clean-up

* test: add success test for `get_payment_status `

* test: add `pending` tests for `check_payment_status`

* chore: remove extracted tests

* test: add more tests

* test: add `no mocks` test

* fix: funding source loading

* refactor: extract `rest_wallet_fixtures_from_json` function

* chore: update comment

* feat: cover `cleanup` call also

* chore: code format

* refactor: start to extract data model

* refactor: extract mock class

* fix: typings

* refactor: improve typings

* chore: add some documentation

* chore: final clean-up

* chore: rename file

* chore: `poetry add --dev pytest_httpserver` (after rebase)
2024-04-08 12:18:21 +03:00
..
lnd_grpc_files Mega-merge 4: Reenable LndWallet gRPC and use TrackPaymentV2 (#745) 2022-08-09 11:49:39 +02:00
macaroon refactor: extract AESCipher to crypto.py (#2202) 2024-01-15 11:51:15 +02:00
__init__.py add zbd to settings 2024-02-23 16:11:27 -03:00
alby.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
base.py test: add unit tests for wallets (funding sources) (#2363) 2024-04-08 12:18:21 +03:00
cliche.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
corelightning.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
corelightningrest.py test: add unit tests for wallets (funding sources) (#2363) 2024-04-08 12:18:21 +03:00
eclair.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
fake.py chore: adhere to ruff's C (#2379) 2024-04-03 17:56:05 +02:00
lnbits.py fix: pending property for PaymentStatus (#2324) 2024-03-14 14:38:10 +02:00
lndgrpc.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
lndrest.py test: add unit tests for wallets (funding sources) (#2363) 2024-04-08 12:18:21 +03:00
lnpay.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
lntips.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
opennode.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
spark.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
void.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00
zbd.py refactor: dev-friendly payment status name (#2322) 2024-03-13 16:17:33 +01:00