9 lines
1.1 KiB
Python
9 lines
1.1 KiB
Python
from http_common import *
|
|
anon=session();top='0ae14c9a-1adb-4ee7-8094-d5d54d4e75f1';paths=['/api/v2/investment/zones/'+top,'/api/v2/investment/zones?'+urllib.parse.urlencode({'category':'industrial_park','development_status':'in_development','activity':'SIMULAÇÃO QA — foco de ensaio'}),'/api/v2/investment/zones/export.csv?'+urllib.parse.urlencode({'category':'industrial_park','development_status':'in_development','activity':'SIMULAÇÃO QA — foco de ensaio'}),'/api/v2/investment/zone-map']
|
|
hashes={}
|
|
for path in paths:
|
|
value=call(anon,path);hashes[path]=proof['events'][-1]['body_sha256'];check('private_T1_not_disclosed_'+str(len(hashes)),'QA-T1-PRIVADO-PRESERVAR' not in json.dumps(value) and 'QA-T2-PRIVADO-PRESERVAR' not in json.dumps(value) and 'editorial_draft' not in json.dumps(value))
|
|
if '/zones?' in path:check('combined_filters_server_count_public_only',value['records']['total']==1 and value['records']['data'][0]['resources'][0]['capacity_value']==48.25)
|
|
(out/'PUBLIC-T1-HASHES.json').write_text(json.dumps(hashes,indent=2),'utf-8')
|
|
print(json.dumps({'public_consumers_captured':len(hashes),'filters':'category + development + activity'}))
|