Ejemplo n.º 1
0
def test_get_news(config=CONFIG):
    """test `get_news` endpoint"""
    test_ticker = CONFIG.get('FETCH', 'test_ticker')
    raw_news = helpers.fetch_REST_directly('news', test_ticker, config)
    get_news = Robinhood().get_news(test_ticker)

    assert get_news == raw_news
Ejemplo n.º 2
0
def test_get_news(config=CONFIG):
    """test `get_news` endpoint"""
    test_ticker = CONFIG.get("FETCH", "test_ticker")
    raw_news = helpers.fetch_REST_directly("news", test_ticker, config)
    get_news = Robinhood().get_news(test_ticker)

    assert get_news == raw_news
Ejemplo n.º 3
0
    def test_fundamental_endpoint(self, config=CONFIG):
        """get raw data from robinhood to test against"""
        global TEST_FUNDAMENTAL

        TEST_FUNDAMENTAL = helpers.fetch_REST_directly('fundamentals',
                                                       self.test_ticker,
                                                       config)
        TEST_FUNDAMENTAL['volume'] = 'OVERWRITE'  #flaky value
Ejemplo n.º 4
0
    def test_quote_endpoint(self, config=CONFIG):
        """get raw data from Robinhood to test against"""
        global TEST_QUOTE

        TEST_QUOTE = helpers.fetch_REST_directly(
            'quotes',
            self.test_ticker,
            config
        )
Ejemplo n.º 5
0
    def test_fundamental_endpoint(self, config=CONFIG):
        """get raw data from Robinhood to test against"""
        global TEST_FUNDAMENTAL

        TEST_FUNDAMENTAL = helpers.fetch_REST_directly(
            'fundamentals',
            self.test_ticker,
            config
        )
        TEST_FUNDAMENTAL['volume'] = 'OVERWRITE'    #flaky value
Ejemplo n.º 6
0
def test_get_news(config=CONFIG):
    """test `get_news` endpoint"""
    test_ticker = CONFIG.get('FETCH', 'test_ticker')
    raw_news = helpers.fetch_REST_directly(
        'news',
        test_ticker,
        config
    )
    get_news = Robinhood().get_news(test_ticker)

    assert get_news == raw_news
Ejemplo n.º 7
0
    def test_quote_endpoint(self, config=CONFIG):
        """get raw data from robinhood to test against"""
        global TEST_QUOTE

        TEST_QUOTE = helpers.fetch_REST_directly('quotes', self.test_ticker,
                                                 config)