示例#1
0
 def factory(**kwargs):
     ld_data = {
         '@context': context_urls_all,
         '@type': 'CreativeWork',
         '@id': '',
     }
     return extend_dict(ld_data, manifestation_data_factory(**kwargs))
示例#2
0
 def factory(*, manifestationOfWork=mock_work_create_id, data=None):
     manifestation_data = {
         'name': 'Title',
         'creator': 'https://ipdb.foundation/api/transactions/12346789',
         'manifestationOfWork': manifestationOfWork
     }
     return extend_dict(manifestation_data, data)
示例#3
0
def work_jsonld(context_urls_all, work_data):
    ld_data = {
        '@context': context_urls_all,
        '@type': 'AbstractWork',
        '@id': '',
    }
    return extend_dict(ld_data, work_data)
示例#4
0
def work_jsonld(context_urls_all, work_data):
    ld_data = {
        '@context': context_urls_all,
        '@type': 'AbstractWork',
        '@id': '',
    }
    return extend_dict(ld_data, work_data)
示例#5
0
def rights_assignment_jsonld(context_urls_all, rights_assignment_data):
    ld_data = {
        '@context': context_urls_all,
        '@type': 'RightsTransferAction',
        '@id': '',
    }
    return extend_dict(ld_data, rights_assignment_data)
示例#6
0
 def factory(**kwargs):
     ld_data = {
         '@context': context_urls_all,
         '@type': 'Right',
         '@id': '',
     }
     return extend_dict(ld_data, right_data_factory(**kwargs))
示例#7
0
 def factory(**kwargs):
     ld_data = {
         '@context': context_urls_all,
         '@type': 'Right',
         '@id': '',
     }
     return extend_dict(ld_data, right_data_factory(**kwargs))
示例#8
0
def rights_assignment_jsonld(context_urls_all, rights_assignment_data):
    ld_data = {
        '@context': context_urls_all,
        '@type': 'RightsTransferAction',
        '@id': '',
    }
    return extend_dict(ld_data, rights_assignment_data)
示例#9
0
 def factory(**kwargs):
     json_data = {
         'type': 'CreativeWork',
     }
     return extend_dict(
         json_data,
         manifestation_data_factory(**kwargs))
示例#10
0
 def factory(*, manifestationOfWork=mock_work_create_id, data=None):
     manifestation_data = {
         'name': 'Title',
         'creator': 'https://ipdb.foundation/api/transactions/12346789',
         'manifestationOfWork': manifestationOfWork
     }
     return extend_dict(manifestation_data, data)
示例#11
0
def test_right_init_raises_if_both_copyright_and_right(
        mock_plugin, entity_cls_name, copyright_data, right_data):
    from coalaip.exceptions import ModelDataError
    from tests.utils import extend_dict
    entity_cls = get_entity_cls(entity_cls_name)

    data = extend_dict(right_data, copyright_data)
    with raises(ModelDataError):
        entity_cls.from_data(data, plugin=mock_plugin)
示例#12
0
 def factory(**kwargs):
     ld_data = {
         '@context': context_urls_all,
         '@type': 'CreativeWork',
         '@id': '',
     }
     return extend_dict(
         ld_data,
         manifestation_data_factory(**kwargs))
示例#13
0
 def factory(**kwargs):
     json_data = {
         'type': 'CreativeWork',
     }
     return extend_dict(json_data, manifestation_data_factory(**kwargs))
示例#14
0
def rights_assignment_json(rights_assignment_data):
    json_data = {
        'type': 'RightsTransferAction',
    }
    return extend_dict(json_data, rights_assignment_data)
示例#15
0
 def factory(*, source=mock_copyright_create_id, data=None):
     right_data = {'source': source, 'license': mock_license_url}
     return extend_dict(right_data, data)
示例#16
0
 def factory(**kwargs):
     json_data = {
         'type': 'Right',
     }
     return extend_dict(json_data, right_data_factory(**kwargs))
示例#17
0
 def factory(**kwargs):
     json_data = {
         'type': 'Right',
     }
     return extend_dict(json_data, right_data_factory(**kwargs))
示例#18
0
 def factory(*, source=mock_copyright_create_id, data=None):
     right_data = {
         'source': source,
         'license': mock_license_url
     }
     return extend_dict(right_data, data)
示例#19
0
 def factory(*, rightsOf=mock_manifestation_create_id, data=None):
     copyright_data = {
         'rightsOf': rightsOf
     }
     return extend_dict(copyright_data, data)
示例#20
0
def rights_assignment_json(rights_assignment_data):
    json_data = {
        'type': 'RightsTransferAction',
    }
    return extend_dict(json_data, rights_assignment_data)
示例#21
0
 def factory(*, rightsOf=mock_manifestation_create_id, data=None):
     copyright_data = {'rightsOf': rightsOf}
     return extend_dict(copyright_data, data)
示例#22
0
def work_json(work_data):
    json_data = {
        'type': 'AbstractWork',
    }
    return extend_dict(json_data, work_data)
示例#23
0
def work_json(work_data):
    json_data = {
        'type': 'AbstractWork',
    }
    return extend_dict(json_data, work_data)