def get_test_records(doctype):
 from frappe.modules import get_doctype_module, get_module_path
 path = os.path.join(get_module_path(get_doctype_module(doctype)), u'doctype', scrub(doctype), u'test_records.json')
 if os.path.exists(path):
  with open(path, u'r') as f:
   return json.loads(f.read())
 else:
  return []

def get_test_records ( doctype ) : from frappe . modules import get_doctype_module , get_module_path path = os . path . join ( get_module_path ( get_doctype_module ( doctype ) ) , u'doctype' , scrub ( doctype ) , u'test_records.json' ) if os . path . exists ( path ) : with open ( path , u'r' ) as f : return json . loads ( f . read ( ) ) else : return [ ]
returns list of objects from test_records .