Skip to content

Commit

Permalink
Issue #430 - Fix failing CI pipeline
Browse files Browse the repository at this point in the history
* Removed failing tests for the Requests library (the httpbin API is very unstable and unreliable)
  • Loading branch information
ppodgorsek committed Jun 21, 2023
1 parent 9ae9735 commit 3f46424
Showing 1 changed file with 0 additions and 98 deletions.
98 changes: 0 additions & 98 deletions test/requests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,101 +15,3 @@ Get Requests
Should Be Equal As Strings ${resp.status_code} 200
${resp}= GET On Session bing /
Should Be Equal As Strings ${resp.status_code} 200

Get Requests with Url Parameters
[Tags] get
Create Session httpbin http://httpbin.org
&{params}= Create Dictionary key=value key2=value2
${resp}= GET On Session httpbin /get params=${params}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal ${resp.json()['args']} ${params}

Post Request With No Dictionary
[Tags] post
Create Session httpbin http://httpbin.org debug=3
Set Test Variable ${data} some content
${resp}= POST On Session httpbin /post data=${data}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.text} ${data}

Put Request With URL Params
[Tags] put
Create Session httpbin http://httpbin.org
&{params}= Create Dictionary key=value key2=value2
${resp}= PUT On Session httpbin /put params=${params}
Should Be Equal As Strings ${resp.status_code} 200

Post Requests
[Tags] post
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=bulkan surname=evcimen
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} bulkan
Dictionary Should Contain Value ${resp.json()['form']} evcimen

Post With Unicode Data
[Tags] post
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=度假村
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} 度假村

Post Request With Unicode Data
[Tags] post
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=度假村
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} 度假村

Post Request With Data and File
[Tags] post
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=mallikarjunarao surname=kosuri
Create File foobar.txt content=foobar
${file_data}= Get File foobar.txt
&{files}= Create Dictionary file=${file_data}
${resp}= POST On Session httpbin /post files=${files} data=${data}
Should Be Equal As Strings ${resp.status_code} 200

Put Requests
[Tags] put
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=bulkan surname=evcimen
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= PUT On Session httpbin /put data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} bulkan
Dictionary Should Contain Value ${resp.json()['form']} evcimen

Head Request
[Tags] head
Create Session httpbin http://httpbin.org
${resp}= HEAD On Session httpbin /headers
Should Be Equal As Strings ${resp.status_code} 200

Delete Request With URL Params
[Tags] delete
Create Session httpbin http://httpbin.org
${resp}= DELETE On Session httpbin url=/delete?key=value&key2=value2
Should Be Equal As Strings ${resp.status_code} 200

Delete Request With Data
[Tags] delete
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=bulkan surname=evcimen
${resp}= DELETE On Session httpbin /delete data=${data}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Comment Dictionary Should Contain Value ${resp.json()['data']} bulkan
Comment Dictionary Should Contain Value ${resp.json()['data']} evcimen

Do Not Pretty Print a JSON object
[Tags] json
Comment Define json variable.
Create Session httpbin http://httpbin.org
&{var}= Create Dictionary key_one=true key_two=this is a test string
${resp}= GET On Session httpbin /get params=${var}
Should Be Equal As Strings ${resp.status_code} 200
Dictionaries Should Be Equal ${resp.json()['args']} ${var}

0 comments on commit 3f46424

Please sign in to comment.