Example #1
0
 def test_parse_query_terms_after_phrase(self):
     parsed = parse_query_string('"electronic filing" 2016')
     assert parsed == dict(terms=['2016'], phrases=['electronic filing'])
Example #2
0
 def test_parse_query_with_only_phrase(self):
     parsed = parse_query_string('"electronic filing"')
     assert parsed == dict(terms=[], phrases=['electronic filing'])
Example #3
0
 def test_parse_query_with_phrase(self):
     parsed = parse_query_string('require "electronic filing" 2016')
     assert parsed == dict(terms=['require', '2016'],
                           phrases=['electronic filing'])
Example #4
0
 def test_parse_query_with_many_phrases(self):
     parsed = parse_query_string(
         'require "electronic filing" 2016 "sans computer"')
     assert parsed == dict(terms=['require', '2016'],
                           phrases=['electronic filing', 'sans computer'])
Example #5
0
 def test_parse_query_no_phrase(self):
     parsed = parse_query_string('hello world')
     assert parsed == dict(terms=['hello world'], phrases=[])