[test] add tests for eclair funding source (#2459)
* fix: test data * test: add `status` tests * refactor: try-catch * test: create invoice tests * test: add first `payinvoice` test * test: add pay_invoice error test * feat: allow more test options * test: add pending tests * fix: make check * test: add, pending no fee * fix: make consistent with other API calls * test: more assertions * test: add pending * test: first payment status test * test: pending status * refactor: remove duplicate code * refactor: rename field * chore: code format * chore: uniform
This commit is contained in:
parent
00f39a2007
commit
8d3b156738
5 changed files with 740 additions and 86 deletions
|
|
@ -45,7 +45,7 @@ async def test_rest_wallet(httpserver: HTTPServer, test_data: WalletTest):
|
|||
|
||||
|
||||
def _apply_mock(httpserver: HTTPServer, mock: Mock):
|
||||
request_data: Dict[str, Union[str, dict]] = {}
|
||||
request_data: Dict[str, Union[str, dict, list]] = {}
|
||||
request_type = getattr(mock.dict(), "request_type", None)
|
||||
# request_type = mock.request_type <--- this des not work for whatever reason!!!
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ def _apply_mock(httpserver: HTTPServer, mock: Mock):
|
|||
**request_data, # type: ignore
|
||||
)
|
||||
|
||||
server_response: Union[str, dict, Response] = mock.response
|
||||
server_response: Union[str, dict, list, Response] = mock.response
|
||||
response_type = mock.response_type
|
||||
if response_type == "response":
|
||||
assert isinstance(server_response, dict), "server response must be JSON"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue