Skip to content

Commit

Permalink
[Fixes #233] add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed May 3, 2024
1 parent c817be9 commit 3941363
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions importer/handlers/common/tests_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ def test_import_resource_should_not_be_imported(self, celery_chord, ogr2ogr_driv
input_params={"files": self.valid_files, "skip_existing_layer": True},
)

# start the resource import
self.handler.import_resource(
files=self.valid_files, execution_id=str(exec_id)
with self.assertRaises(Exception) as exception:
# start the resource import
self.handler.import_resource(
files=self.valid_files, execution_id=str(exec_id)
)
self.assertIn(
"No valid layers found", exception.exception.args[0], 'No valid layers found.'
)

celery_chord.assert_not_called()
Expand Down

0 comments on commit 3941363

Please sign in to comment.