def test_results(self): ret_val = share_analysis.get_share_data(self.csv_rand_input) for company_info in ret_val.split('\n')[1:]: if company_info: company_name, year, month, price = company_info.split('\t') self.assertEqual(str(year), str(self.test_dict[company_name]['year'])) self.assertEqual(str(month), str(self.test_dict[company_name]['month'])) self.assertEqual(str(price), str(self.test_dict[company_name]['price']))
def test_all_companies(self): ret_val = share_analysis.get_share_data(self.csv_rand_input) self.assertTrue(not 'Critical' in ret_val) for key in self.test_dict: self.assertTrue(key in ret_val)