svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 325 forks source link

POST form data #194

Open torchingloom opened 8 years ago

torchingloom commented 8 years ago

This is simple and dirty send POST form realization ex

- config:
  - testset: 'some test'

  - variable_binds: {
      url_prefix: 'api/v1',
      authorization_api_key: 'key',
      admin_username: 'ta',
      json_content_type: 'application/json',
      multipart_content_type: 'multipart/form-data',
      json_first_id: 'objects.0.id',
      geojson_first_id: 'features.0.properties.id',
      monument_id: 111
    }

- test:
  - url: {template: '$url_prefix/monument/image/'}
  - method: 'POST'
  - headers: {
        Content-Type: 'multipart/form-data;',
        template: {Authorization: 'ApiKey $admin_username:$authorization_api_key'}
    }
  - body: {
      form: {
        monument: $monument_id,
        file: '@static/img/upload-test-1.jpg'
      }
    }
svanoort-jenkins commented 8 years ago

Can one of the admins verify this patch?