robotframework - Sending a POST request using Balkan's requests lib with data and files (Robot Framework) -


i'm trying send request (post) using balkan's requests library test case written in robot framework http://bulkan.github.io/robotframework-requests/#post 2 parameters data , file. unfortunatelly, time have same error described below.

my test case:

x_t_should upload file correctly , http 200     send default file sut , return response  *** keywords *** send default file sut , return response     [arguments]    ${user_login}=${user_login}    ${user_password}=${user_password}     ${url}=    url     ${auth}=    create list    ${user_login}    ${user_password}     create session    rm    ${url}    auth=${auth}     &{headers}=    create dictionary    content-type=application/x-www-form-urlencoded     &{data}=    create dictionary    name=file    filename=${default_file_name}     ${file_data}=    binary file    ${curdir}${/}resources${/}${default_file_name}     &{files}=    create dictionary    file=${file_data}     ${resp}=    post request    rm    ${upload_uri}    files=${files}    data=${data}    headers=${headers}     delete sessions 

error (from robot framework):

20160525 09:47:10.645 :  fail : valueerror: data must not string. 

the problem keyword post request. when not set argument files or data if set both args. see these strange error.

it bug in library?

according documentation, files parameter list of file names. passing actual file contents keyword. might explain why getting "data must not string".


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -