Files
jspg/fix_merger.py

16 lines
459 B
Python

import json
with open("fixtures/merger.json", "r") as f:
data = json.load(f)
# Find our new test
test_case = next(t for t in data[0]["tests"] if t["description"] == "Test organization_id syntactic sugar permutations")
# Fix the first SQL command (INSERT INTO entity for person)
sql = test_case["expect"]["sql"][0]
sql.remove(" \"organization_id\",")
sql.remove(" NULL,")
with open("fixtures/merger.json", "w") as f:
json.dump(data, f, indent=2)