svanoort / pyresttest

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

Is there an extension point for "body"? #217

Open norbertkeri opened 7 years ago

norbertkeri commented 7 years ago

I would like to make writing JSON post bodies a bit more friendly in regards to syntax, eg. pass in a dict as the body, instead of manually JSON serializing it to a string. I was thinking doing something like:

- test:
    name: Test creating an organisation unit
    url: organisationUnits
    method: POST
    body:
        json_dict:
            name: "hello"
            shortName: "world"

But I couldn't find an extension point for the "body" attribute. Is there one? If not, can you give me some pointers on where would I start implementing it?