def test_ah_latest(self): # method test_ah_latest checks if the value being return from # ah_latest is greater than 0 stock_symbol = 'aapl' info = after_hours.ah_latest(stock_symbol) info = info[1] self.assertGreater(float(info), 0)
def test_ah_latest_symbol(self): # method test_ah_latest_symbol checks if the symbol being # returned from ah_latest is accurate stock_symbol = 'aapl' test = after_hours.ah_latest(stock_symbol) test = test[0] self.assertEqual(test, 'aapl', msg='Test ah_latest symbol failed')