Skip to content

Commit

Permalink
tests: delete unused function for arxiv tests
Browse files Browse the repository at this point in the history
Signed-off-by: Spiros Delviniotis <[email protected]>
  • Loading branch information
spirosdelviniotis committed Aug 21, 2017
1 parent 0a8920d commit 0231b31
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions tests/unit/test_arxiv_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0231b31

Please sign in to comment.