def test_pre_latest_price(self): # method test_pre_latest_price checks if the price being # returned from pre_latest is greater than 0 stock_symbol = 'aapl' test = after_hours.pre_latest(stock_symbol) test = test[1] self.assertGreater(test, 0, msg='Test pre_latest price failed')
def test_pre_latest_symbol(self): # method test_pre_latest_symbol checks if the symbol being # returned from pre_latest is accurate stock_symbol = 'aapl' test = after_hours.pre_latest(stock_symbol) test = test[0] self.assertEqual(test, 'aapl', msg='Test pre_latest symbol failed')