def test_table_statement(self): headers = load_from_script.get_headers(self.in_csv) conversions = load_from_script.load_conversion_table(self.conversion_file) load_from_script.print_table_writer(self.out_file, headers, conversions, self.in_csv) self.assertTrue(os.path.exists(self.out_file))
def test_loading_conversion(self): conv = load_from_script.load_conversion_table(self.conversion_file) expected_keys = {'field_from_csv', 'modifier', 'conversion'} found_keys = set(conv[0].keys()) self.assertEqual(found_keys, expected_keys) self.assertEqual(len(conv), 92)