Skip to content

Commit

Permalink
Agrego un test para harvest_catalog()
Browse files Browse the repository at this point in the history
  • Loading branch information
lrromero committed Apr 24, 2018
1 parent c0f9511 commit c42a12b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ def mock_call_action(action, data_dict=None):
self.assertCountEqual([self.catalog_id+'_'+ds['identifier'] for ds in self.catalog.datasets],
harvested_ids)

@patch('pydatajson.federation.RemoteCKAN', autospec=True)
def test_harvest_catalog_with_empty_list(self, mock_portal):
harvested_ids = harvest_catalog_to_ckan(self.catalog, 'portal', 'key', self.catalog_id,
owner_org='owner', dataset_list=[])
mock_portal.assert_not_called()
self.assertEqual([], harvested_ids)


class RemoveDatasetTestCase(unittest.TestCase):

Expand Down

0 comments on commit c42a12b

Please sign in to comment.