chiark / gitweb /
The server should now come to life straight away and start picking
[disorder] / tests / search.py
index 01ab893efa5360f742a2bb738ec6be95fdfd78c0..dab3939933c9301145905a818d9e777f78613718 100755 (executable)
@@ -41,6 +41,7 @@ def check_search_results(terms, expected):
 def test():
     """Check that the search produces the right results"""
     dtest.start_daemon()
+    dtest.create_user()
     time.sleep(2)                       # give rescan a chance
     global client
     client = disorder.client()
@@ -88,6 +89,8 @@ def test():
     check_search_results([u"fi\u0300rst"], first)
     check_search_results([u"THI\u0301RD"], third)
     check_search_results([u"thI\u0301rd"], third)
+    # stopwords shouldn't show up
+    check_search_results(["01"], [])
     
     if failures > 0:
         sys.exit(1)