forked from dfkthf125/api-v1-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_statistics.py
More file actions
22 lines (16 loc) · 777 Bytes
/
test_statistics.py
File metadata and controls
22 lines (16 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import unittest
from blockchain.statistics import *
class TestGetChart(unittest.TestCase):
def test_getChart(self):
chart_data = get_chart('total-bitcoins', '5weeks', '8hours')
self.assertEqual('ok', chart_data.status)
self.assertEqual('Bitcoins in circulation', chart_data.name)
self.assertEqual('BTC', chart_data.unit)
self.assertEqual('day', chart_data.period)
self.assertEqual('The total number of bitcoins that have already been mined; in other words, the current supply of bitcoins on the network.', chart_data.description)
class TestGetPools(unittest.TestCase):
def test_getPools(self):
pools = get_pools('5days')
self.assertTrue(len(pools) > 0)
if __name__ == '__main__':
unittest.main()