Пример #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
Пример #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
Пример #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
Пример #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
        )
Пример #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
Пример #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
Пример #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)