Skip to content

Commit 75ed52a

Browse files
committed
test: reduce tests still using remote httpbin
1 parent 0d80c7c commit 75ed52a

File tree

1 file changed

+4
-53
lines changed

1 file changed

+4
-53
lines changed

atests/testcase.robot

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -218,82 +218,33 @@ Post Request With File
218218

219219
Post Request With Data and File
220220
[Tags] post
221-
Create Session httpbin http://httpbin.org
222221
&{data}= Create Dictionary name=mallikarjunarao surname=kosuri
223222
Create File foobar.txt content=foobar
224223
${file_data}= Get File foobar.txt
225224
&{files}= Create Dictionary file=${file_data}
226-
${resp}= Post Request httpbin /post files=${files} data=${data}
225+
${resp}= Post Request ${test_session} /anything files=${files} data=${data}
227226
Should Be Equal As Strings ${resp.status_code} 200
228227

229228
Put Requests
230229
[Tags] put
231-
Create Session httpbin http://httpbin.org
232230
&{data}= Create Dictionary name=bulkan surname=evcimen
233231
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
234-
${resp}= Put Request httpbin /put data=${data} headers=${headers}
232+
${resp}= Put Request ${test_session} /anything data=${data} headers=${headers}
235233
Dictionary Should Contain Value ${resp.json()['form']} bulkan
236234
Dictionary Should Contain Value ${resp.json()['form']} evcimen
237235

238-
Head Request
239-
[Tags] head
240-
Create Session httpbin http://httpbin.org
241-
${resp}= Head Request httpbin /headers
242-
Should Be Equal As Strings ${resp.status_code} 200
243-
244-
Options Request
245-
[Tags] options
246-
Create Session httpbin http://httpbin.org
247-
${resp}= Options Request httpbin /headers
248-
Should Be Equal As Strings ${resp.status_code} 200
249-
Dictionary Should Contain Key ${resp.headers} allow
250-
251-
Delete Request With URL Params
252-
[Tags] delete
253-
Create Session httpbin http://httpbin.org
254-
&{params}= Create Dictionary key=value key2=value2
255-
${resp}= Delete Request httpbin /delete ${params}
256-
Should Be Equal As Strings ${resp.status_code} 200
257-
258-
Delete Request With No Data
259-
[Tags] delete
260-
Create Session httpbin http://httpbin.org
261-
${resp}= Delete Request httpbin /delete
262-
Should Be Equal As Strings ${resp.status_code} 200
263-
264-
Delete Request With Data
265-
[Tags] delete
266-
Create Session httpbin http://httpbin.org debug=3
267-
&{data}= Create Dictionary name=bulkan surname=evcimen
268-
${resp}= Delete Request httpbin /delete data=${data}
269-
Should Be Equal As Strings ${resp.status_code} 200
270-
Log ${resp.content}
271-
Comment Dictionary Should Contain Value ${resp.json()['data']} bulkan
272-
Comment Dictionary Should Contain Value ${resp.json()['data']} evcimen
273-
274-
Delete Requests with Json Data
275-
[Tags] delete
276-
Create Session httpbin http://httpbin.org
277-
&{data}= Create Dictionary latitude=30.496346 longitude=-87.640356
278-
${resp}= Delete Request httpbin /delete json=${data}
279-
Should Be Equal As Strings ${resp.status_code} 200
280-
${jsondata}= Set Variable ${resp.json()}
281-
Should Be Equal ${jsondata['json']} ${data}
282-
283236
Patch Requests
284237
[Tags] patch
285-
Create Session httpbin http://httpbin.org
286238
&{data}= Create Dictionary name=bulkan surname=evcimen
287239
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
288-
${resp}= Patch Request httpbin /patch data=${data} headers=${headers}
240+
${resp}= Patch Request ${test_session} /anything data=${data} headers=${headers}
289241
Dictionary Should Contain Value ${resp.json()['form']} bulkan
290242
Dictionary Should Contain Value ${resp.json()['form']} evcimen
291243

292244
Patch Requests with Json Data
293245
[Tags] patch
294-
Create Session httpbin http://httpbin.org
295246
&{data}= Create Dictionary latitude=30.496346 longitude=-87.640356
296-
${resp}= Patch Request httpbin /patch json=${data}
247+
${resp}= Patch Request ${test_session} /anything json=${data}
297248
Should Be Equal As Strings ${resp.status_code} 200
298249
${jsondata}= Set Variable ${resp.json()}
299250
Should Be Equal ${jsondata['json']} ${data}

0 commit comments

Comments
 (0)