-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add unit tests for wallets (funding sources) #2363
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2363 +/- ##
==========================================
+ Coverage 58.73% 59.46% +0.72%
==========================================
Files 65 65
Lines 9347 9404 +57
==========================================
+ Hits 5490 5592 +102
+ Misses 3857 3812 -45 ☔ View full report in Codecov by Sentry. |
if one of you guys has a spare moment can you please check the unit test here: #2270 thanks in advance. :) |
e3155c0
to
028b01c
Compare
Needs rebase to remove conflicts in |
028b01c
to
653d6a6
Compare
Yeah, I've pushed the rebased branch then ran again |
All funding sources must behave uniformly. If, for example, the endpoint returns an
HTTP 404
then all wallets api should return aPending
state. It is nok for some wallets to return a status and for others to raise an exception.This PR creates the basis for checking the interface of all rest wallets. It currently only handles
corelightingrest
andlndrest
, but will easily be extended.The test data is specified in a JSON fixture. Adding new funding sources means updating the JSON.
A new dev dependency to
pytest-httpserver
has been added. This lib is used to simulate the LN Node rest responses.Minor changes have been made to
corelightningrest.py
,lndrest.py
andbase.py
in order to unify the interface.This PR also closes: #2062