From 0231b31e3c3a45eccb50db23885044ef66164a80 Mon Sep 17 00:00:00 2001 From: Spiros Delviniotis Date: Fri, 18 Aug 2017 14:15:14 +0200 Subject: [PATCH] tests: delete unused function for `arxiv` tests Signed-off-by: Spiros Delviniotis --- tests/unit/test_arxiv_all.py | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/tests/unit/test_arxiv_all.py b/tests/unit/test_arxiv_all.py index bd75e5a4..db8c1354 100644 --- a/tests/unit/test_arxiv_all.py +++ b/tests/unit/test_arxiv_all.py @@ -11,11 +11,14 @@ import pytest -from scrapy.crawler import Crawler +from scrapy.crawler import Crawler from hepcrawl.pipelines import InspireCeleryPushPipeline from hepcrawl.spiders import arxiv_spider -from hepcrawl.testlib.fixtures import fake_response_from_file +from hepcrawl.testlib.fixtures import ( + fake_response_from_file, + clean_dir, +) @pytest.fixture @@ -25,28 +28,6 @@ def spider(): return spider -@pytest.fixture -def one_result(spider): - """Return results generator from the arxiv spider. Tricky fields, one - record. - """ - from scrapy.http import TextResponse - - records = list( - spider.parse( - fake_response_from_file( - 'arxiv/sample_arxiv_record0.xml', - response_type=TextResponse, - ) - ) - ) - - assert records - pipeline = InspireCeleryPushPipeline() - pipeline.open_spider(spider) - return [pipeline.process_item(record, spider) for record in records] - - @pytest.fixture def many_results(spider): """Return results generator from the arxiv spider. Tricky fields, many