Skip to content

Commit 6bfe1ee

Browse files
fix: send initial kwargs for all nextlink calls (#36)
1 parent 7422d68 commit 6bfe1ee

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

fourinsight/api/authenticate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def get_pages(self, url, **kwargs):
223223
url = None
224224
else:
225225
url = response.json().get("@odata.nextLink")
226+
kwargs = {}
226227
yield response
227228

228229

tests/test_authenticator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ def get_side_effect(*args, **kwargs):
552552
mock_get.assert_has_calls(
553553
[
554554
call("foo/bar/baz", baz="foobar"),
555-
call("first/nextlink", baz="foobar"),
556-
call("second/nextlink", baz="foobar"),
557-
call("third/nextlink", baz="foobar"),
555+
call("first/nextlink"),
556+
call("second/nextlink"),
557+
call("third/nextlink"),
558558
]
559559
)
560560

@@ -605,9 +605,9 @@ def get_side_effect(*args, **kwargs):
605605
mock_get.assert_has_calls(
606606
[
607607
call("foo/bar/baz", baz="foobar"),
608-
call("first/nextlink", baz="foobar"),
609-
call("second/nextlink", baz="foobar"),
610-
call("third/nextlink", baz="foobar"),
608+
call("first/nextlink"),
609+
call("second/nextlink"),
610+
call("third/nextlink"),
611611
]
612612
)
613613

0 commit comments

Comments
 (0)