Exemplo n.º 1
0
def test_nipsa_filter_filters_out_nipsad_annotations():
    """nipsa_filter() filters out annotations with "nipsa": True."""
    assert search.nipsa_filter() == {
        "bool": {
            "should": [
                {'not': {'term': {'nipsa': True}}}
            ]
        }
    }
Exemplo n.º 2
0
def test_nipsa_filter_filters_out_nipsad_annotations():
    """nipsa_filter() filters out annotations with "nipsa": True."""
    assert search.nipsa_filter() == {
        "bool": {
            "should": [{
                'not': {
                    'term': {
                        'nipsa': True
                    }
                }
            }]
        }
    }
Exemplo n.º 3
0
def test_nipsa_filter_users_own_annotations_are_not_filtered():
    filter_ = search.nipsa_filter(userid="fred")

    assert {'term': {'user': '******'}} in (filter_["bool"]["should"])
Exemplo n.º 4
0
def test_nipsa_filter_users_own_annotations_are_not_filtered():
    filter_ = search.nipsa_filter(userid="fred")

    assert {'term': {'user': '******'}} in (
        filter_["bool"]["should"])