def draft_resource(valid_dataset2): resource = Resource() resource.link = "http://drafts.com" resource.title = "draft resource" resource.dataset = valid_dataset2 resource.status = "draft" resource.save() return resource
def valid_resource_with_description(valid_dataset): resource = Resource() resource.url = "http://smth.smwhere.com" resource.title = "Resource name" resource.description = "Test Resource Description" resource.dataset = valid_dataset resource.status = 'published' resource.save() return resource
def valid_resource_with_description(valid_dataset): resource = Resource() resource.link = "http://falconframework.org" resource.title = "Resource name" resource.description = "Test Resource Description" resource.dataset = valid_dataset resource.status = 'published' resource.tracker.saved_data['link'] = resource.link resource.tracker.saved_data['file'] = resource.file resource.save() return resource