@app.cli.command()<EOL>def fixtures():
temp_path = os.path.join(os.path.dirname(__file__), '<STR_LIT>')<EOL>demo_files_path = os.path.join(os.path.dirname(__file__), '<STR_LIT>')<EOL>loc = Location(name='<STR_LIT>', uri=temp_path, default=True)<EOL>db.session.add(loc)<EOL>db.session.commit()<EOL>demo_files = (<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>)<EOL>rec_uuid = uuid4()<EOL>provider = RecordIdProvider.create(object_type='<STR_LIT>', object_uuid=rec_uuid)<EOL>data = {<EOL>'<STR_LIT>': provider.pid.pid_value,<EOL>}<EOL>record = Record.create(data, id_=rec_uuid)<EOL>bucket = Bucket.create()<EOL>RecordsBuckets.create(record=record.model, bucket=bucket)<EOL>for f in demo_files:<EOL><INDENT>with open(os.path.join(demo_files_path, f), '<STR_LIT:rb>') as fp:<EOL><INDENT>record.files[f] = fp<EOL><DEDENT><DEDENT>record.files.flush()<EOL>record.commit()<EOL>db.session.commit()<EOL>
Command for working with test data.