12 lines
1.5 KiB
Python
12 lines
1.5 KiB
Python
from http_common import *
|
|
source=private/'source';route=source/'routes/web.php';candidate=route.read_bytes();previous=(out.parents[1]/'routes/web.php').read_bytes();manager=session('manager');owner=session('owner');anon=session()
|
|
try:
|
|
route.write_bytes(previous);call(manager,base,expected=404);check('compatible_rollback_removes_operational_route',True)
|
|
canonical=call(owner,'/minhas-oportunidades/15/response')['data'];rels=canonical['classification'];current=call(owner,'/minhas-oportunidades/15/classification')
|
|
call(owner,'/minhas-oportunidades/15/draft',{'canonical':{'enterprise_size':canonical['enterprise_size']},'etag':current['etag'],'reason':'Edição HTTP pelo percurso anterior durante a reversão compatível QA.'},method='PUT')
|
|
after=call(owner,'/minhas-oportunidades/15/response')['data'];check('compatible_old_HTTP_editor_preserves_relations_decisions_and_taxonomy',after['classification']==rels and after['subsector_id']==canonical['subsector_id'] and after['economic_activity_id']==canonical['economic_activity_id'])
|
|
check('compatible_old_routes_still_project_new_chain',len(call(anon,'/negocios/'+f['business_slug'])['data']['multidimensional'])==3 and len(call(anon,'/api/v1/investment/opportunities/inv-mz-gen-5673010729603343')['context']['classification'])==3)
|
|
finally:route.write_bytes(candidate)
|
|
check('candidate_routing_restored',plan(manager)['installed'])
|
|
print(json.dumps({'checks':len(proof['checks']),'phase':'actual compatible route swap and old HTTP save complete'}))
|