Skip to content

Commit

Permalink
fix docstring y test
Browse files Browse the repository at this point in the history
  • Loading branch information
lrromero committed Oct 30, 2018
1 parent 4728312 commit 0ca6d7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pydatajson/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier,


def resources_upload(portal_url, apikey, resource_files):
"""Sube un recurso local a una distribución del portal pasado por parámetro
"""Sube archivos locales a sus distribuciones correspondientes en el portal
pasado por parámetro.
Args:
portal_url (str): La URL del portal CKAN de destino.
Expand All @@ -92,8 +93,7 @@ def resources_upload(portal_url, apikey, resource_files):
except Exception as e:
logger.exception(
"Error subiendo recurso {} a la distribución {}: {}"
.format(resource_files[resource], resource_files, str(e))
)
.format(resource_files[resource], resource_files, str(e)))
return res


Expand Down
2 changes: 1 addition & 1 deletion tests/test_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def test_resource_upload_succesfully(self, mock_portal):
return_value={'id': 'an_id',
'resource_type': 'file.upload'})
resources = {'an_id': 'tests/samples/resource_sample.csv'}
res = resource_upload('portal', 'key', resources)
res = resources_upload('portal', 'key', resources)
mock_portal.return_value.action.resource_patch.assert_called_with(
id='an_id',
resource_type='file.upload',
Expand Down

0 comments on commit 0ca6d7f

Please sign in to comment.