Example #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()
Example #2
0
 def test_symbols(self):
     from pyEX.refdata import symbols, iexSymbols, mutualFundSymbols, otcSymbols
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         symbols()
         iexSymbols()
         mutualFundSymbols()
         otcSymbols()
Example #3
0
 def test_symbols(self):
     from pyEX.refdata import symbols, iexSymbols, mutualFundSymbols, otcSymbols, internationalSymbols, fxSymbols
     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')
         fxSymbols()
Example #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()