Hello, I'm writing an application that needs to fetch a json file from a webserver. I'm writing the tests and have a question:
if I have the following methods: def test_headers(self): headers = libary.get_data(data) check header status def test_get_info info = libary.get_info(libary.get_data(data)) This way I call the url twice, even though I have the data available from the first test. my application would just variables such as: h = libary.get_data(data) i = libary.get_info(h) so only one call. What is the best way to set up tests to resuse the data more? I'm new to using the testing framework so I'm not sure on best practises and such. Is introducing persistance by using sql lite the best way? I should be able to just reuse data within the object. Or is my design wrong? Any tips or suggestions would be appreciated! - Mike
-- http://mail.python.org/mailman/listinfo/python-list