def test_should_get_by_doi_all_view():
    session = get_client_credentials_session()

    with cassette('fixtures/resources/catalog/get_catalog_by_identifier/get_by_doi_all_view.yaml'):
        doc = session.catalog.by_identifier(doi='10.1371/journal.pone.0000908', view='all')

        assert_all_view(doc)
コード例 #2
0
def test_should_get_all_view_by_id():
    session = get_client_credentials_session()

    with cassette('fixtures/resources/catalog/get_catalog_by_id/get_all_view.yaml'):
        doc = session.catalog.get('5cd8328e-febe-3299-8e26-cf6ab2c07f0f', view='all')

        assert_all_view(doc)
コード例 #3
0
def test_should_get_all_view_by_id():
    session = get_client_credentials_session()

    with cassette('fixtures/resources/catalog/get_catalog_by_id/get_all_view.yaml'):
        doc = session.catalog.get('5cd8328e-febe-3299-8e26-cf6ab2c07f0f', view='all')

        assert_all_view(doc)
コード例 #4
0
def test_should_get_by_doi_all_view():
    session = get_client_credentials_session()

    with cassette(
            'fixtures/resources/catalog/get_catalog_by_identifier/get_by_doi_all_view.yaml'
    ):
        doc = session.catalog.by_identifier(doi='10.1371/journal.pone.0000908',
                                            view='all')

        assert_all_view(doc)
コード例 #5
0
def test_should_lookup_by_metadata_all_view():
    session = get_client_credentials_session()

    with cassette('fixtures/resources/catalog/lookup/lookup_by_metadata_all_view.yaml'):
        doc = session.catalog.lookup(
            title='Changes in tree reproductive traits reduce functional diversity in a fragmented '
                  'Atlantic forest landscape',
            year=2007,
            source='PLoS ONE',
            view='all'
        )

        assert doc.score == 91
        assert_all_view(doc)
コード例 #6
0
def test_should_lookup_by_metadata_all_view():
    session = get_client_credentials_session()

    with cassette(
            'fixtures/resources/catalog/lookup/lookup_by_metadata_all_view.yaml'
    ):
        doc = session.catalog.lookup(
            title=
            'Changes in tree reproductive traits reduce functional diversity in a fragmented '
            'Atlantic forest landscape',
            year=2007,
            source='PLoS ONE',
            view='all')

        assert doc.score == 91
        assert_all_view(doc)