def test_price_not_string(self):
     result = bitcoinprice.get_price()
     self.assertIsNot(result, str)
 def test_price_eur(self):
     result = bitcoinprice.get_price(curr='eur')
     self.assertIsInstance(result, dict)
 def test_price(self):
     result = bitcoinprice.get_price()
     self.assertIsInstance(result, dict)
 def test_price_last(self):
     result = bitcoinprice.get_price()
     self.assertTrue(result['last'])
Example #5
0
import bitcoinprice 
from pprint import pprint

pprint(bitcoinprice.get_price())
pprint(bitcoinprice.get_price('btc', 'eur'))
pprint(bitcoinprice.get_price('ltc', 'eur'))

pprint("Price Simple (usd):"+bitcoinprice.get_price_simple())
pprint("Price Simple (eur):"+bitcoinprice.get_price_simple('btc','eur'))
pprint("Price Simple (eth):"+bitcoinprice.get_price_simple('eth'))
pprint("Price Simple (ltc):"+bitcoinprice.get_price_simple('ltc'))