def test_load_NYSE_symbols(self): nyse = Market.objects.get(symbol='NYSE') before = db_count('stock') load_market_symbols(nyse) after = db_count('stock') self.assertTrue(after - before == 2908, 'Number of stocks mismatch!')
def test_load_LSE_symbols(self): lse = Market.objects.get(symbol='LSE') before = db_count('quote') parse_stocks(lse) after = db_count('quote') self.assertTrue(after - before == 2163, 'Number of quotes mismatch!')
def test_load_IGBM_symbols(self): igbm = Market.objects.get(symbol='IGBM') before = db_count('stock') load_market_symbols(igbm) after = db_count('stock') self.assertTrue(after - before == 112, 'Number of stocks mismatch!')
def test_IGBM_qoutes(self): ibgm = Market.objects.get(symbol='IGBM') before = db_count('quote') parse_stocks(ibgm) after = db_count('quote') self.assertTrue(after - before == 112, 'Number of quotes mismatch!')