I'm trying to test my connexion app, I've followed the link here,
And the get requests seem to be working fine. Now I'm trying to test post requests, but the endpoint method takes in parameters as arguments. My set up is very similar to the one linked above, and I followed the advice listed here, but it doesn't seem to work. In my tests I have tried something like:
response = client.post('/path-to-request', data=dict(var1='data1', var2='data2'))
Where client is the same as the one defined by ksindi here. I'll have this path mapped to a python method in my swagger file and want to retrieve the data packaged in the post as the argument to that method. Example snippet in a swaggerfile:
paths:
...
/models:
post:
operationId: bar.foo
...
And then in bar.py I'll have a method foo:
foo(data_here):
<code>
The attempt I mentioned above seems to not work, I will get through to the method and the code will execute but "data_here" will be None, I want it to be the dict(var1='data1', var2='data2') that is packaged with the post request. Any help is appreciated thanks!