Closed YoooFeng closed 8 years ago
Sorry that the example for Render is invalid.....the correct one should be:
resp = client.request(app.s('user').post(**input_))
because the accepted parameter of Operation.call is **k. I'll fix this part in tutorial later. Thanks for reporting issues and welcome to python's world.
Thank you so much for your response mission-liao, It works now!I am designing a tool that could autotest all APIs in swagger spec, it seems i have a long way to go :)
Ya, it would be a long way to go. Before cooking by yourself, did you try this one? https://github.com/Trax-air/swagger-tester. It looks like a new library but would be worth to try.
Thank you for your advise, I will have a try!
Hi, recently i'm trying to use pyswagger(in python 2.7) to test my swagger spec. When i use renderer to test APIs, i got: TypeError: call() takes exactly 1 argument (2 given). My code is the same as the tutorial/render.md:
app = SwaggerApp.create('http://petstore.swagger.io/v2/swagger.json') client = Client() renderer = Renderer() input_ = renderer.renderall(app.s('user').post) resp = client.request(app.s('user').post(input))
I'm new in python, so who can tell me what's the problem?Thank you!