Ejemplo n.º 1
0
 def test_upcomingEvents(self):
     from pyEX import upcomingEvents, upcomingEarnings, upcomingDividends, upcomingSplits, upcomingIPOs
     with patch('requests.get') as mock, \
          patch('pickle.dump'):
         mock.return_value = MagicMock()
         mock.return_value.status_code = 200
         upcomingEvents()
         upcomingEarnings()
         upcomingDividends()
         upcomingSplits()
         upcomingIPOs()
         upcomingEvents(SYMBOL)
         upcomingEarnings(SYMBOL)
         upcomingDividends(SYMBOL)
         upcomingSplits(SYMBOL)
         upcomingIPOs(SYMBOL)
Ejemplo n.º 2
0
    def test_upcomingEvents(self):
        from pyEX import (
            upcomingDividends,
            upcomingEarnings,
            upcomingEvents,
            upcomingIPOs,
            upcomingSplits,
        )

        with patch("requests.get") as mock:
            mock.return_value = MagicMock()
            mock.return_value.status_code = 200
            upcomingEvents()
            upcomingEarnings()
            upcomingDividends()
            upcomingSplits()
            upcomingIPOs()
            upcomingEvents(SYMBOL)
            upcomingEvents(SYMBOLS)
            upcomingEarnings(SYMBOL)
            upcomingEarnings(SYMBOLS)
            upcomingDividends(SYMBOL)
            upcomingDividends(SYMBOLS)
            upcomingSplits(SYMBOL)
            upcomingSplits(SYMBOLS)
            upcomingIPOs(SYMBOL)
            upcomingIPOs(SYMBOLS)