Here are the examples of the python api coindata.request.retrieve taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
View Complete Implementation : test.py
Copyright MIT License
Author : Anaxilaus
Copyright MIT License
Author : Anaxilaus
def test_retrieve_with_all_input_formats(self):
"""Try retrieve with all possible input formats."""
for inp in self.possible_input_formats:
output = coindata.request.retrieve(inp)
if not output:
raise ValueError("No output with following input: " + inp)
3
View Complete Implementation : test.py
Copyright MIT License
Author : Anaxilaus
Copyright MIT License
Author : Anaxilaus
def test_write_read(self):
"""Compare request.retrieve and request.read outputs."""
# retrieve
data = coindata.request.retrieve('btc')
# write and read
dir_test = os.path.dirname(os.path.realpath(__file__))
file_path = coindata.request.write('btc', dir_test)
data_comp = coindata.request.read(file_path)
# clean up
os.remove(file_path)
# test
if not self.is_same(data, data_comp):
raise ValueError("Written and read data aren't same!")