Skip to content

Commit

Permalink
Re-use spy on queue.close calls
Browse files Browse the repository at this point in the history
  • Loading branch information
sultaniman committed Feb 28, 2024
1 parent 6431b62 commit 9352f9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/scraping/test_scraping_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ def test_pipeline_runners_handle_extended_and_simple_use_cases(mocker):
dataset_name="quotes",
)

spy_on_queue_close_err = mocker.spy(sources.scraping.queue.ScrapingQueue, "close")
with mocker.patch("dlt.Pipeline.run", side_effect=OSError("bla")):
run_pipeline(err_pipeline, MySpider, dataset_name="quotes")
spy_on_queue_close_err.assert_called()
spy_on_queue_close.assert_called()


@pytest.mark.skip(
Expand Down

0 comments on commit 9352f9d

Please sign in to comment.