コード例 #1
0
    def test_symbolsDF(self):
        from pyEX.refdata import symbolsDF
        from pyEX import Client
        with patch('requests.get') as mock, \
                patch('pickle.dump'):
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            mock.return_value.json = MagicMock(return_value=[])
            c = Client(version='sandbox')
            symbolsDF()
            c.iexSymbolsDF()
            c.mutualFundSymbolsDF()
            c.otcSymbolsDF()
            c.internationalSymbolsDF()
            c.internationalSymbolsDF('GB')
            c.internationalSymbolsDF(exchange='test')

            c.symbolsList()
            c.iexSymbolsList()
            c.mutualFundSymbolsList()
            c.otcSymbolsList()
            c.internationalSymbolsList()
            c.internationalSymbolsList('GB')
            c.internationalSymbolsList(exchange='test')

            mock.return_value.json = MagicMock(return_value={
                'currencies': [],
                'pairs': []
            })
            c.fxSymbolsDF()
            c.fxSymbolsList()
コード例 #2
0
ファイル: test_refdata.py プロジェクト: furyhawk/pyEX
    def test_symbolsDF(self):
        from pyEX import Client
        from pyEX.refdata import symbolsDF

        with patch("requests.get") as mock:
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            mock.return_value.json = MagicMock(return_value=[])
            c = Client(version="sandbox")
            symbolsDF()
            c.iexSymbolsDF()
            c.mutualFundSymbolsDF()
            c.otcSymbolsDF()
            c.internationalSymbolsDF()
            c.internationalSymbolsDF("GB")
            c.internationalSymbolsDF(exchange="test")

            c.symbolsList()
            c.iexSymbolsList()
            c.mutualFundSymbolsList()
            c.otcSymbolsList()
            c.internationalSymbolsList()
            c.internationalSymbolsList("GB")
            c.internationalSymbolsList(exchange="test")

            mock.return_value.json = MagicMock(return_value={
                "currencies": [],
                "pairs": []
            })
            c.fxSymbolsDF()
            c.fxSymbolsList()
コード例 #3
0
 def test_symbolsDF(self):
     from pyEX.refdata import symbolsDF
     with patch('requests.get') as mock:
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         mock.return_value.json = MagicMock(return_value=[])
         symbolsDF()
コード例 #4
0
ファイル: test_refdata.py プロジェクト: jecker7/pyEX
    def test_symbolsDF(self):
        from pyEX.refdata import symbolsDF
        from pyEX import Client
        with patch('requests.get') as mock:
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            mock.return_value.json = MagicMock(return_value=[])
            c = Client()
            symbolsDF()
            c.iexSymbolsDF()
            c.mutualFundSymbolsDF()
            c.otcSymbolsDF()
            c.internationalSymbolsDF()
            c.internationalSymbolsDF('GB')
            c.internationalSymbolsDF(exchange='test')
            c.fxSymbolsDF()

            c.symbolsList()
            c.iexSymbolsList()
            c.mutualFundSymbolsList()
            c.otcSymbolsList()
            c.internationalSymbolsList()
            c.internationalSymbolsList('GB')
            c.internationalSymbolsList(exchange='test')
            c.fxSymbolsList()
コード例 #5
0
ファイル: test_refdata.py プロジェクト: noisyoscillator/pyEX
 def test_symbolsDF(self):
     from pyEX.refdata import symbolsDF
     symbolsDF()
コード例 #6
0
ファイル: test_refdata.py プロジェクト: knightsUCF/pyEX
 def test_symbolsDF(self):
     from pyEX.refdata import symbolsDF
     from pyEX import Client
     c = Client()
     symbolsDF()
     c.iexSymbolsDF()