Skip to content

Commit

Permalink
Merge pull request #3 from LNOpenMetrics/macros/api_break_fix
Browse files Browse the repository at this point in the history
fix: fixes api break regarding paginator pattern
  • Loading branch information
vincenzopalazzo authored Oct 17, 2022
2 parents 6cd0d4e + 3622d98 commit 9eaf2a5
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 3 deletions.
Binary file modified lnmetrics_api/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified lnmetrics_api/__pycache__/lnmetrics_client.cpython-38.pyc
Binary file not shown.
Binary file modified lnmetrics_api/queries/__pycache__/queries.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion lnmetrics_api/queries/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
page_info {
start
end
hash_next_page
has_next
}
channels_info {
node_id
Expand Down
Binary file modified tests/__pycache__/conftest.cpython-38-pytest-5.4.3.pyc
Binary file not shown.
Binary file modified tests/__pycache__/test_lnmetrics_api.cpython-38-pytest-5.4.3.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/test_lnmetrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_get_metric_one_paginator(client: LNMetricsClient) -> None:

assert "page_info" in response
page_info = response["page_info"]
has_next = page_info["hash_next_page"]
has_next = page_info["has_next"]
counting_request = 1
while has_next:
first = page_info["start"]
Expand All @@ -68,6 +68,6 @@ def test_get_metric_one_paginator(client: LNMetricsClient) -> None:
counting_request += 1
assert "page_info" in response
page_info = response["page_info"]
has_next = page_info["hash_next_page"]
has_next = page_info["has_next"]
# TODO: check why this fails
# assert counting_request == 4

0 comments on commit 9eaf2a5

Please sign in to comment.