proper test for merge fix for organization_id setting

This commit is contained in:
2026-05-13 15:38:42 -04:00
parent c7372891d8
commit 40e08cbf09
10 changed files with 1105 additions and 12 deletions

32
fix_quotes_json.py Normal file
View File

@ -0,0 +1,32 @@
import json
with open("fixtures/merger.json", "r") as f:
data = json.load(f)
test_case = data[0]["tests"][-1]
for j, sql_group in enumerate(test_case["expect"]["sql"]):
new_group = []
i = 0
while i < len(sql_group):
s = sql_group[i]
if s.strip() == "'{":
if i + 2 < len(sql_group):
next_line = sql_group[i+1].strip()
next_next_line = sql_group[i+2].strip()
if next_next_line == "}',":
# Reconstruct
new_group.append(f" '{next_line}',")
i += 3
continue
elif next_next_line == "}'":
new_group.append(f" '{next_line}'")
i += 3
continue
new_group.append(s)
i += 1
test_case["expect"]["sql"][j] = new_group
with open("fixtures/merger.json", "w") as f:
json.dump(data, f, indent=2)