Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5e88f3

Browse files
committed
test: test that all is ignored, when as_list=False
1 parent06a8050 commitb5e88f3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎gitlab/tests/test_gitlab.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,24 @@ def resp_2(url, request):
119119
self.assertEqual(l[0]["a"],"b")
120120
self.assertEqual(l[1]["c"],"d")
121121

122+
deftest_all_omitted_when_as_list(self):
123+
@urlmatch(scheme="http",netloc="localhost",path="/api/v4/tests",method="get")
124+
defresp(url,request):
125+
headers= {
126+
"content-type":"application/json",
127+
"X-Page":2,
128+
"X-Next-Page":2,
129+
"X-Per-Page":1,
130+
"X-Total-Pages":2,
131+
"X-Total":2,
132+
}
133+
content='[{"c": "d"}]'
134+
returnresponse(200,content,headers,None,5,request)
135+
136+
withHTTMock(resp):
137+
result=self.gl.http_list("/tests",as_list=False,all=True)
138+
self.assertIsInstance(result,GitlabList)
139+
122140

123141
classTestGitlabHttpMethods(unittest.TestCase):
124142
defsetUp(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp