From 422c434224c965385a21d0d2948b005b6d44cccb Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 17 Jul 2015 22:12:08 +0200 Subject: fix integration test_search --- service/test/support/integration/app_test_client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'service/test/support') diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index e5c845cc..e139d879 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -170,13 +170,15 @@ class AppTestClient(object): tags = 'tag:%s' % tag return self.search(tags, page, window) + @defer.inlineCallbacks def search(self, query, page=1, window=100): - res, req = self.get("/mails", { + res, _ = self.get("/mails", { 'q': [query], 'w': [str(window)], 'p': [str(page)] }) - return [ResponseMail(m) for m in res['mails']] + res = yield res + defer.returnValue([ResponseMail(m) for m in res['mails']]) def get_attachment(self, ident, encoding): res, req = self.get("/attachment/%s" % ident, {'encoding': [encoding]}, as_json=False) -- cgit v1.2.3