Example #1
0
    def test_json_delta_to_csv_copyright_info_added_csv(self):
        test_json = self.get_test_loc('json2csv/copyright_info_added.json')
        result_file = self.get_temp_file('.csv')
        with open(result_file, 'wb') as rf:
            json2csv.json_delta_to_csv(test_json, rf)
        expected_file = self.get_test_loc('json2csv/copyright_info_added.csv')

        check_csvs(result_file, expected_file)
Example #2
0
    def test_json_delta_to_csv_blank_csv(self):
        test_json = self.get_test_loc('json2csv/empty.json')
        result_file = self.get_temp_file('.csv')
        with open(result_file, 'wb') as rf:
            json2csv.json_delta_to_csv(test_json, rf)
        expected_file = self.get_test_loc('json2csv/empty.csv')

        check_csvs(result_file, expected_file)
Example #3
0
    def test_json_delta_to_csv_single_copyright_change_csv(self):
        test_json = self.get_test_loc('json2csv/single_copyright_change.json')
        result_file = self.get_temp_file('.csv')
        with open(result_file, 'wb') as rf:
            json2csv.json_delta_to_csv(test_json, rf)
        expected_file = self.get_test_loc(
            'json2csv/single_copyright_change.csv')

        check_csvs(result_file, expected_file)