From: Richard Kettlewell Date: Sun, 2 Dec 2007 12:07:34 +0000 (+0000) Subject: verify that tag search works across dump X-Git-Tag: 1.5.99+dev10~28 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/f47d40ba33dbfa7cb4fd6a8e22176bd4fa61e9ea verify that tag search works across dump --- diff --git a/tests/dump.py b/tests/dump.py index d308b84..8cf0943 100755 --- a/tests/dump.py +++ b/tests/dump.py @@ -32,6 +32,12 @@ def test(): print "setting a global pref" c.setglobal("foo", "before"); assert c.getglobal("foo") == "before", "checking global foo=before" + print "adding a tag" + c.set(track, "tags", "wibble") + print "checking track appears in tag search" + tracks = c.search(["tag:wibble"]) + assert len(tracks) == 1, "checking there is exactly one search result" + assert tracks[0] == track, "checking for right search result" print "dumping database" print dtest.command(["disorder-dump", "--config", disorder._configfile, "--dump", dump]) @@ -59,6 +65,10 @@ def test(): assert c.get(track, "bar") is None, "checking fresh track pref has gone" print "checking fresh global pref" assert c.getglobal("bar") is None, "checking fresh global pref has gone" + print "checking tag search still works" + tracks = c.search(["tag:wibble"]) + assert len(tracks) == 1, "checking there is exactly one search result" + assert tracks[0] == track, "checking for right search result" if __name__ == '__main__': dtest.run()