10 lines
864 B
Python
10 lines
864 B
Python
from pathlib import Path
|
|
import json,shutil,uuid
|
|
out=Path(__file__).resolve().parent;p=out/'business-country-attempt-data.json'
|
|
assert not (out/'business-country-attempt-data.before-encoding-fix.json').exists()
|
|
shutil.copyfile(p,out/'business-country-attempt-data.before-encoding-fix.json')
|
|
shutil.copyfile(out/'business-country-before.json',out/'business-country-encoding-harness-attempt.json')
|
|
d=json.loads(p.read_text(encoding='utf-8'));d['key']=str(uuid.uuid4());d['payload'].update(country='Moçambique',fullName='QA negocio paises legado',message='Manifestacao exclusivamente sintetica para testar paises, origem e estatisticas na QA.')
|
|
p.write_text(json.dumps(d,ensure_ascii=False,indent=2),encoding='utf-8')
|
|
print(json.dumps({'harness_encoding_corrected':True,'previous_synthetic_attempt_preserved':True,'changed_payload_new_key':True,'active_writes':0}))
|