예제 #1
0
 def test_data(self):
     '''test returned data'''
     expiration=options.expirations(underlying_symbol='AAPL')[0]['date']
     data=options.strikes(underlying_symbol="AAPL",expiration=expiration)
     assert 'strike' in data['strikes']
예제 #2
0
 def test_wrong_symbol(self):
     '''test wrong underlying symbol'''
     data=options.expirations(underlying_symbol="AAPL##RRWSSDJKF")
     assert data['expirations']==None
예제 #3
0
 def test_return_type(self):
     '''test return type'''
     expiration=options.expirations(underlying_symbol='AAPL')[0]['date']
     data=options.strikes(underlying_symbol="AAPL",expiration=expiration)
     assert isinstance(data,dict)
예제 #4
0
 def test_return_type(self):
     '''test return type'''
     expiration=options.expirations(underlying_symbol='AAPL')[0]['date']
     data=options.chains(underlying_symbol="AAPL",expiration=expiration,dataframe=False)
     assert isinstance(data,list)
예제 #5
0
 def test_data(self):
     '''test returned data'''
     data=options.expirations(underlying_symbol="AAPL")
     assert 'data','strikes' in data[0]
예제 #6
0
 def test_return_type(seld):
     '''test return type'''
     data=options.expirations(underlying_symbol="AAPL")
     assert isinstance(data,list)
예제 #7
0
 def test_data(self):
     '''test returned data'''
     expiration=options.expirations(underlying_symbol='AAPL')[0]['date']
     data=options.chains(underlying_symbol="AAPL",expiration=expiration,dataframe=False)
     assert 'description','high'in data[0]
예제 #8
0
 def test_dataframe_return_type(self):
     '''test dataframe return type'''
     expiration=options.expirations(underlying_symbol='AAPL')[0]['date']
     data=options.chains(underlying_symbol="AAPL",expiration=expiration)
     assert isinstance(data,pandas.DataFrame)