search.services.index.tests.test_util module

Tests for search.services.index.util.

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

Bases: unittest.case.TestCase

Tests for index.util.parse_date_partial().

test_date_partial_only()[source]

Term includes only a four-digit date partial.

test_in_word()[source]

A false positive in a word.

test_last_millenium()[source]

Term is for a pre-2000 paper.

test_near_words()[source]

Term includes date partial plus other terms.

test_out_of_range()[source]

Term looks like a date partial, but is not a valid date.

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

Bases: unittest.case.TestCase

Test index.util.is_old_papernum().

test_is_old_papernum()[source]

User enters a 7-digit number that looks like an old papernum.