def get_fields(self, schema, **field_kwargs):
fields = {}<EOL>for k, v in schema.fields.items():<EOL><INDENT>if v.is_pk(): continue<EOL>if issubclass(v.type, basestring):<EOL><INDENT>fields[k] = testdata.get_words()<EOL><DEDENT>elif issubclass(v.type, int):<EOL><INDENT>fields[k] = testdata.get_int32()<EOL><DEDENT>elif issubclass(v.type, long):<EOL><INDENT>fields[k] = testdata.get_int64()<EOL><DEDENT>elif issubclass(v.type, datetime.datetime):<EOL><INDENT>fields[k] = testdata.get_past_datetime()<EOL><DEDENT>elif issubclass(v.type, float):<EOL><INDENT>fields[k] = testdata.get_float()<EOL><DEDENT>elif issubclass(v.type, bool):<EOL><INDENT>fields[k] = True if random.randint(<NUM_LIT:0>, <NUM_LIT:1>) == <NUM_LIT:1> else False<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT:{}>".format(v.type))<EOL><DEDENT><DEDENT>fields.update(field_kwargs)<EOL>return fields<EOL>
return the fields of orm with randomized data