From aad984f2b471149f0c8ceaf2487583cb0e64edf1 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Sat, 4 Jun 2016 14:58:14 +0800 Subject: test APi evolution add filter to retrieve last results add 'last' query parameter prcess in ResultsCLHandler.get() add 'sort' and 'last' parameters process in GenericApiHandler._list() add sort() and limit() fake in fake_pymongo.py JIRA: FUNCTEST-259 Change-Id: I96c1ff37325c65cf9c421f4277662dde28b1473d Signed-off-by: SerenaFeng --- result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'result_collection_api/opnfv_testapi/tests/unit') diff --git a/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py b/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py index e556968..9b4d120 100644 --- a/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py +++ b/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py @@ -32,6 +32,12 @@ class MemCursor(object): self.count -= 1 return self.collection.pop() + def sort(self, key_or_list, direction=None): + return self + + def limit(self, limit): + return self + class MemDb(object): -- cgit 1.2.3-korg