Skip to content

Commit

Permalink
Cleaned up intgration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaron committed Apr 14, 2024
1 parent 5e2b7d2 commit c0d5c83
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from roboquant.brokers.ibkr import IBKRBroker


class TestIBKRBroker(unittest.TestCase):
class TestIBKR(unittest.TestCase):

def test_ibkr_order(self):
logging.basicConfig(level=logging.DEBUG)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import logging
import unittest

from roboquant import Config
from roboquant.feeds import TiingoHistoricFeed
from roboquant import Config, Timeframe
from roboquant.feeds import TiingoHistoricFeed, TiingoLiveFeed
from tests.common import get_recent_start_date, run_price_item_feed


class TestTiingoHistoricFeed(unittest.TestCase):
class TestTiingo(unittest.TestCase):

def setUp(self) -> None:
config = Config()
Expand All @@ -33,6 +33,24 @@ def test_tiingo_historic_fx(self):
feed.retrieve_intraday_fx("EURUSD", "AUDUSD", start_date=get_recent_start_date())
run_price_item_feed(feed, ["EURUSD", "AUDUSD"], self)

def test_tiingo_crypt_live_feed(self):
feed = TiingoLiveFeed(self.key)
feed.subscribe("btcusdt", "ethusdt")
run_price_item_feed(feed, ["BTCUSDT", "ETHUSDT"], self, Timeframe.next(minutes=1))
feed.close()

def test_tiingo_fx_live_feed(self):
feed = TiingoLiveFeed(self.key, "fx")
feed.subscribe("eurusd")
run_price_item_feed(feed, ["EURUSD"], self, Timeframe.next(minutes=1))
feed.close()

def test_tiingo_iex_live_feed(self):
feed = TiingoLiveFeed(self.key, "iex")
feed.subscribe("IBM", "TSLA")
run_price_item_feed(feed, ["IBM", "TSLA"], self, Timeframe.next(minutes=1))
feed.close()


if __name__ == "__main__":
unittest.main()
36 changes: 0 additions & 36 deletions tests/integration/test_tiingolivefeed.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tests.common import run_price_item_feed


class TestYahooFeed(unittest.TestCase):
class TestYahoo(unittest.TestCase):

def test_yahoo_feed(self):
feed = YahooFeed("MSFT", "JPM", start_date="2018-01-01", end_date="2020-01-01")
Expand Down

0 comments on commit c0d5c83

Please sign in to comment.