From 2390d65e5ffcc0670f45fdede6d96f0d370e9f37 Mon Sep 17 00:00:00 2001 From: Spiros Delviniotis Date: Mon, 21 Aug 2017 13:44:30 +0200 Subject: [PATCH] pos: add proceedings support Addresses #159 Signed-off-by: Spiros Delviniotis --- .../records/PoS(LATTICE 2013)001.html | 119 +++++++++--------- .../pos_conference_proceedings_records.json | 2 +- tests/functional/pos/test_pos.py | 10 +- 3 files changed, 62 insertions(+), 69 deletions(-) diff --git a/tests/functional/pos/fixtures/https_server/records/PoS(LATTICE 2013)001.html b/tests/functional/pos/fixtures/https_server/records/PoS(LATTICE 2013)001.html index 5ed0c148..64ad7a6f 100644 --- a/tests/functional/pos/fixtures/https_server/records/PoS(LATTICE 2013)001.html +++ b/tests/functional/pos/fixtures/https_server/records/PoS(LATTICE 2013)001.html @@ -1,65 +1,58 @@ - -PoS(LATTICE 2013)001 - - - - - - - - - - - - -Main Image - - - -

PoS(LATTICE 2013)001

- - - - -
-

Heavy Flavour Physics Review

-

A. El-Khadra

-

in 31st International Symposium on Lattice Field Theory LATTICE 2013

-

Contribution: pdf

- - - -
- - - - - - - - - - \ No newline at end of file + + PoS(LATTICE 2013)001 + + + + + + + + + + + Main Image + + + +

PoS(LATTICE 2013)001

+ + + +
+

Heavy Flavour Physics Review

+

A. El-Khadra

+

in 31st International Symposium on Lattice Field Theory LATTICE 2013

+

Contribution: pdf

+
+ + + + + + + + + diff --git a/tests/functional/pos/fixtures/pos_conference_proceedings_records.json b/tests/functional/pos/fixtures/pos_conference_proceedings_records.json index 3605ad13..d2ebb12a 100644 --- a/tests/functional/pos/fixtures/pos_conference_proceedings_records.json +++ b/tests/functional/pos/fixtures/pos_conference_proceedings_records.json @@ -1,5 +1,5 @@ [ - { + { "publication_info": [ { "journal_volume": "LATTICE 2013", diff --git a/tests/functional/pos/test_pos.py b/tests/functional/pos/test_pos.py index c122b68e..66f24831 100644 --- a/tests/functional/pos/test_pos.py +++ b/tests/functional/pos/test_pos.py @@ -32,7 +32,7 @@ def override_generated_fields(record): @pytest.fixture(scope="function") -def set_up_oai_environment(): +def set_up_environment(): package_location = get_test_suite_path( 'pos', 'fixtures', @@ -69,10 +69,10 @@ def set_up_oai_environment(): ] ) def test_pos_conference_paper_record_and_proceedings_record( - set_up_oai_environment, + set_up_environment, expected_results, ): - crawler = get_crawler_instance(set_up_oai_environment.get('CRAWLER_HOST_URL')) + crawler = get_crawler_instance(set_up_environment.get('CRAWLER_HOST_URL')) results = CeleryMonitor.do_crawl( app=celery_app, @@ -80,10 +80,10 @@ def test_pos_conference_paper_record_and_proceedings_record( monitor_iter_limit=100, events_limit=1, crawler_instance=crawler, - project=set_up_oai_environment.get('CRAWLER_PROJECT'), + project=set_up_environment.get('CRAWLER_PROJECT'), spider='pos', settings={}, - **set_up_oai_environment.get('CRAWLER_ARGUMENTS') + **set_up_environment.get('CRAWLER_ARGUMENTS') ) gotten_results = [override_generated_fields(result) for result in results]