2016-11-24 13:34:37 -05:00
|
|
|
from unittest import TestCase
|
|
|
|
|
|
|
|
from metrik.tasks.cboe import CboeOptionableList
|
|
|
|
|
|
|
|
|
|
|
|
class CboeTest(TestCase):
|
|
|
|
|
|
|
|
def test_optionable_list(self):
|
|
|
|
companies = CboeOptionableList.retrieve_data()['companies']
|
2016-12-06 08:15:51 -05:00
|
|
|
assert len(companies) > 2000
|
|
|
|
|
|
|
|
|
|
|
|
def test_optionable_list_format(self):
|
|
|
|
companies = CboeOptionableList.retrieve_data()['companies']
|
|
|
|
symbols = [c['Stock Symbol'] for c in companies]
|
|
|
|
|
|
|
|
assert 'AAPL' in symbols
|