Esempio n. 1
0
def test_search_datasets_multi_match_tag(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(tags=['pine', 'blue'])
        assert len(datasets) == 2
        assert datasets == [ds1, ds2]
        assert code == 200
Esempio n. 2
0
def test_search_datasets_one_ontology(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(ontologies=["DUO:0000018"])
        assert len(datasets) == 1
        assert datasets == [ds1]
        assert code == 200
Esempio n. 3
0
def test_search_datasets_tag_no_list(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(tags='No')
        assert len(datasets) == 0
        assert datasets == []
        assert code == 200
Esempio n. 4
0
def test_search_datasets_tag_2(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(tags=['candig'])
        assert len(datasets) == 2
        assert datasets == [ds1, ds2]
        assert code == 200
Esempio n. 5
0
def test_search_datasets_version_none(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(version='0.22')
        assert len(datasets) == 0
        assert datasets == []
        assert code == 200
Esempio n. 6
0
def test_search_datasets_basic(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets()
        assert len(datasets) == 2
        assert datasets == [ds1, ds2]
        assert code == 200
Esempio n. 7
0
def test_search_datasets_different_version_tag(test_client):
    """
    search_datasets
    """

    ds1, ds2, context, _, _ = test_client

    with context:
        datasets, code = operations.search_datasets(tags=['pine'],
                                                    version="0.3")
        assert len(datasets) == 0
        assert datasets == []
        assert code == 200