Ejemplo n.º 1
0
    def test_symbols(self):
        from pyEX.refdata import (
            fxSymbols,
            iexSymbols,
            internationalSymbols,
            mutualFundSymbols,
            otcSymbols,
            symbols,
        )

        with patch("requests.get") as mock:
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            symbols()
            iexSymbols()
            mutualFundSymbols()
            otcSymbols()
            internationalSymbols()
            internationalSymbols("GB")
            internationalSymbols(exchange="test")
            mock.return_value.json = MagicMock(return_value={
                "currencies": [],
                "pairs": []
            })
            fxSymbols()
Ejemplo n.º 2
0
 def test_symbols(self):
     from pyEX.refdata import symbols
     from pyEX.refdata import iexSymbols
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         symbols()
         iexSymbols()
Ejemplo n.º 3
0
 def test_symbols(self):
     from pyEX.refdata import symbols, iexSymbols, mutualFundSymbols, otcSymbols, internationalSymbols
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         symbols()
         iexSymbols()
         mutualFundSymbols()
         otcSymbols()
         internationalSymbols()
         internationalSymbols('GB')
         internationalSymbols(exchange='test')
Ejemplo n.º 4
0
 def test_symbols(self):
     from pyEX.refdata import symbols, iexSymbols, mutualFundSymbols, otcSymbols, internationalSymbols, fxSymbols
     with patch('requests.get') as mock, \
             patch('pickle.dump'):
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         symbols()
         iexSymbols()
         mutualFundSymbols()
         otcSymbols()
         internationalSymbols()
         internationalSymbols('GB')
         internationalSymbols(exchange='test')
         mock.return_value.json = MagicMock(return_value={
             'currencies': [],
             'pairs': []
         })
         fxSymbols()
Ejemplo n.º 5
0
 def test_symbols(self):
     from pyEX.refdata import symbols
     symbols()