X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/346bd0cf4e8fb8ead2ad5b59fd9a628c8592e1ee..a4243347741f0f7079858e03bca8fc32990f525c:/tests/search.py diff --git a/tests/search.py b/tests/search.py index 01ab893..5e3d200 100755 --- a/tests/search.py +++ b/tests/search.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # # This file is part of DisOrder. -# Copyright (C) 2007 Richard Kettlewell +# Copyright (C) 2007, 2008 Richard Kettlewell # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -41,7 +41,8 @@ def check_search_results(terms, expected): def test(): """Check that the search produces the right results""" dtest.start_daemon() - time.sleep(2) # give rescan a chance + dtest.create_user() + dtest.rescan() global client client = disorder.client() first = ["Joe Bloggs/First Album/01:F\xC3\x8Crst track.ogg", @@ -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)