From 49c4088ceb02da735d549014aaa9cba8c729ba54 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 9 Oct 2012 22:09:16 +0200 Subject: modified Api: filter downloads by state --- tests/test_database.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_database.py') diff --git a/tests/test_database.py b/tests/test_database.py index b7408e213..fb134ff41 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -5,6 +5,7 @@ from collections import defaultdict from helper.Stubs import Core from helper.BenchmarkTest import BenchmarkTest +from module.Api import DownloadState from module.database import DatabaseBackend # disable asyncronous queries @@ -81,7 +82,7 @@ class TestDatabase(BenchmarkTest): self.assert_file(choice(files.values())) def test_get_files_queued(self): - files = self.db.getAllFiles(unfinished=True) + files = self.db.getAllFiles(state=DownloadState.Unfinished) print "Fetched %d files queued" % len(files) def test_delete(self): @@ -159,7 +160,7 @@ class TestDatabase(BenchmarkTest): assert self.db.filecount() == 0 assert self.db.queuecount() == 0 - assert self.db.proccesscount() == 0 + assert self.db.processcount() == 0 def assert_file(self, f): try: -- cgit v1.2.3