Exemple #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']
Exemple #2
0
 def test_wrong_symbol(self):
     '''test wrong underlying symbol'''
     data=options.expirations(underlying_symbol="AAPL##RRWSSDJKF")
     assert data['expirations']==None
Exemple #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)
Exemple #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)
Exemple #5
0
 def test_data(self):
     '''test returned data'''
     data=options.expirations(underlying_symbol="AAPL")
     assert 'data','strikes' in data[0]
Exemple #6
0
 def test_return_type(seld):
     '''test return type'''
     data=options.expirations(underlying_symbol="AAPL")
     assert isinstance(data,list)
Exemple #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]
Exemple #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)