cdent / gabbi

Declarative HTTP Testing for Python and anything else
http://gabbi.readthedocs.org/
Other
148 stars 34 forks source link

query data from mysql compare response #226

Closed EtheriousNatsu closed 6 years ago

EtheriousNatsu commented 6 years ago

I need query data from mysql to compare response ,how should i do?

cdent commented 6 years ago

Thanks for your question, but we're going to need a lot more info to be able to help. Do you have some existing tests that you can share that are almost what you are trying to do, but don't work yet, so we can understand what you are doing?

It sounds like perhaps you need a Fixture which sets up some data and then stores some of it in environment variables which you are then able to use later in tests for a subsitution.

Some examples of doing this are in the tests for the placement service within openstack. Have a look at the fixtures.py and the surrounding files for some ideas.

cdent commented 6 years ago

Closing due to no response. If you have additional input, please re-open.