with open(file.path, 'r', encoding='utf8') as query_file:
filed_query: QueryData = json_load(query_file)
assert isinstance(filed_query['results'], list)
- assert type(filed_query['text']) is QueryText
- assert type(filed_query['retrieved_at']) is DatetimeStr
+ assert isinstance(filed_query['text'], str)
+ assert isinstance(filed_query['retrieved_at'], str)
id_ = QueryId(splitext(basename(file.path))[0])
results_list = filed_query['results']
- query_text = filed_query['text']
- retrieved_at = filed_query['retrieved_at']
+ query_text = QueryText(filed_query['text'])
+ retrieved_at = DatetimeStr(filed_query['retrieved_at'])
queries_data += [(id_, results_list, query_text, retrieved_at)]
return queries_data