def showcase_with_id_and_datasets(showcase_id, num): showcase = ShowcaseFactory.create( id=showcase_id, title='showcase {} with datasets'.format(showcase_id)) datasets = DatasetFactory.create_batch(num, showcases=(showcase, )) for dataset in datasets: ResourceFactory.create_batch(3, dataset=dataset) return showcase
def featured_showcases(): return [ ShowcaseFactory.create(main_page_position=pos) for pos in range(1, 5) ]
def x_showcases(num): return ShowcaseFactory.create_batch(num)
def showcases(): return ShowcaseFactory.create_batch(3)
def showcase_with_datasets(): showcase = ShowcaseFactory.create() DatasetFactory.create_batch(2, showcase=showcase) return showcase
def draft_showcase_with_id(showcase_id): return ShowcaseFactory.create( id=showcase_id, title='Draft showcase {}'.format(showcase_id), status='draft')
def removed_showcase_with_id(showcase_id): return ShowcaseFactory.create( id=showcase_id, title='Removed showcase {}'.format(showcase_id), is_removed=True)
def another_showcase_with_id(showcase_id): return ShowcaseFactory.create(id=showcase_id, title='Another showcase %s' % showcase_id)
def second_showcase_with_id(showcase_id): return ShowcaseFactory.create(id=showcase_id, title='Second showcase %s' % showcase_id)
def removed_showcase(): return ShowcaseFactory.create(is_removed=True, title='Removed showcase')
def showcase(): return ShowcaseFactory.create()
def dataset_with_id_and_showcases(dataset_id, num): _dataset = DatasetFactory.create(id=dataset_id, title='dataset {} with showcases'.format(dataset_id)) for x in range(num): ShowcaseFactory.create(title=f'Ponowne wykorzystanie {x+1}', datasets=[_dataset]) return _dataset