22
22
import unittest
23
23
except ImportError :
24
24
import unittest2 as unittest
25
- import json
26
25
27
26
from httmock import HTTMock # noqa
28
27
from httmock import response # noqa
@@ -184,16 +183,16 @@ def test_list_next_link(self):
184
183
path = '/api/v3/projects/1/repository/branches' , method = "get" ,
185
184
query = r'per_page=1' )
186
185
def resp_one (url , request ):
187
- """
188
- First request:
186
+ """First request:
187
+
189
188
http://localhost/api/v3/projects/1/repository/branches?per_page=1
190
189
"""
191
190
headers = {
192
191
'content-type' : 'application/json' ,
193
- 'link' : '<http://localhost/api/v3/projects/1/repository/branc' \
194
- 'hes?page=2&per_page=0>; rel="next", <http://localhost/api/v3' \
195
- '/projects/1/repository/branches?page=2&per_page=0>; rel="las' \
196
- 't", <http://localhost/api/v3/projects/1/repository/branches?' \
192
+ 'link' : '<http://localhost/api/v3/projects/1/repository/branc'
193
+ 'hes?page=2&per_page=0>; rel="next", <http://localhost/api/v3'
194
+ '/projects/1/repository/branches?page=2&per_page=0>; rel="las'
195
+ 't", <http://localhost/api/v3/projects/1/repository/branches?'
197
196
'page=1&per_page=0>; rel="first"'
198
197
}
199
198
content = ('[{"branch_name": "otherbranch", '
@@ -207,10 +206,10 @@ def resp_one(url, request):
207
206
def resp_two (url , request ):
208
207
headers = {
209
208
'content-type' : 'application/json' ,
210
- 'link' : '<http://localhost/api/v3/projects/1/repository/branc' \
211
- 'hes?page=1&per_page=0>; rel="prev", <http://localhost/api/v3' \
212
- '/projects/1/repository/branches?page=2&per_page=0>; rel="las' \
213
- 't", <http://localhost/api/v3/projects/1/repository/branches?' \
209
+ 'link' : '<http://localhost/api/v3/projects/1/repository/branc'
210
+ 'hes?page=1&per_page=0>; rel="prev", <http://localhost/api/v3'
211
+ '/projects/1/repository/branches?page=2&per_page=0>; rel="las'
212
+ 't", <http://localhost/api/v3/projects/1/repository/branches?'
214
213
'page=1&per_page=0>; rel="first"'
215
214
}
216
215
content = ('[{"branch_name": "testbranch", '
0 commit comments