コード例 #1
0
ファイル: conftest.py プロジェクト: horosin/mcod-backend
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
コード例 #2
0
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
コード例 #3
0
ファイル: conftest.py プロジェクト: horosin/mcod-backend
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