Example #1
0
def dcat_datasets_list(context, data_dict):

    ckan_datasets = _search_ckan_datasets(context, data_dict)

    return [
        converters.ckan_to_dcat(ckan_dataset) for ckan_dataset in ckan_datasets
    ]
Example #2
0
    def test_ckan_to_dcat(self):
        ckan_dict = self._get_file_as_dict('full_ckan_dataset.json')
        expected_dcat_dict = self._get_file_as_dict('dataset.json')

        dcat_dict = converters.ckan_to_dcat(ckan_dict)

        assert dcat_dict == expected_dcat_dict, self._poor_mans_dict_diff(
            expected_dcat_dict, dcat_dict)
Example #3
0
def dcat_datasets_list(context, data_dict):

    toolkit.check_access('dcat_datasets_list', context, data_dict)

    ckan_datasets = _search_ckan_datasets(context, data_dict)['results']

    return [converters.ckan_to_dcat(ckan_dataset)
            for ckan_dataset in ckan_datasets]
    def test_ckan_to_dcat(self):
        ckan_dict = self._get_file_as_dict('full_ckan_dataset.json')
        expected_dcat_dict = self._get_file_as_dict('dataset.json')

        dcat_dict = converters.ckan_to_dcat(ckan_dict)

        assert dcat_dict == expected_dcat_dict, self._poor_mans_dict_diff(
            expected_dcat_dict, dcat_dict)
Example #5
0
def dcat_datasets_list(context, data_dict):

    toolkit.check_access('dcat_datasets_list', context, data_dict)

    ckan_datasets = _search_ckan_datasets(context, data_dict)['results']

    return [converters.ckan_to_dcat(ckan_dataset)
            for ckan_dataset in ckan_datasets]
Example #6
0
def dcat_datasets_list(context, data_dict):

    ckan_datasets = _search_ckan_datasets(context, data_dict)

    return [converters.ckan_to_dcat(ckan_dataset)
            for ckan_dataset in ckan_datasets]