alessandro trinca tornidor
test: update playwright e2e tests because of the new /thesaurus-inflated-phrase agnostic response structure
7149fa6
raw
history blame contribute delete
785 Bytes
import json
from my_ghost_writer.constants import app_logger, PROJECT_ROOT_FOLDER
from my_ghost_writer.jsonpath_extractor import JSONPathStructureAnalyzer
from tests import EVENTS_FOLDER
if __name__ == '__main__':
# with open(EVENTS_FOLDER / "response_thesaurus_phrase_inflated_marching.json") as src:
with open(PROJECT_ROOT_FOLDER / "tmp" / "responses_mod" / "response_marching_old.json") as src:
response_json = json.load(src)
analyzer = JSONPathStructureAnalyzer()
# analyzer.extract_all_paths(response_json["results"])
paths = analyzer.extract_all_paths(response_json["results"])
app_logger.info("##########")
detailed_report = analyzer.get_detailed_type_report()
report = analyzer.get_structure_report()
app_logger.info("##########")