search.services.index.tests.tests module

Tests for search.services.index.

class search.services.index.tests.tests.TestPrepare(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for index.prepare.

test_group_terms()[source]

_group_terms() groups terms using logical precedence.

test_group_terms_all_and()[source]

_group_terms() groups terms using logical precedence.

class search.services.index.tests.tests.TestSearch(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for index.search().

test_advanced_query(mock_Elasticsearch, mock_Search)[source]

index.search supports AdvancedQuery.

test_simple_query(mock_Elasticsearch, mock_Search)[source]

index.search supports SimpleQuery.

class search.services.index.tests.tests.TestWildcardSearch(methodName='runTest')[source]

Bases: unittest.case.TestCase

A wildcard [*?] character is present in a querystring.

test_match_any_wildcard_in_literal()[source]

A * wildcard is present in a string literal.

test_match_any_wildcard_is_present()[source]

A * wildcard is present in the query.

test_mixed_wildcards_in_literal()[source]

Both * and ? characters are present in a string literal.

test_multiple_match_any_wildcard_in_literal()[source]

Multiple * wildcards are present in a string literal.

test_wildcard_at_opening_of_string()[source]

A wildcard character is the first character in the querystring.

test_wildcards_both_inside_and_outside_literal()[source]

Wildcard characters are present both inside and outside literal.

test_wildcards_inside_outside_multiple_literals()[source]

Wildcard chars are everywhere, and there are multiple literals.