diff options
author | 2016-06-04 14:58:14 +0800 | |
---|---|---|
committer | 2016-06-04 15:13:14 +0800 | |
commit | 5d2050686734a4636efe1bd35221a7d6c60a3d5f (patch) | |
tree | db4ef42abd479192c7de4e91e0edd657aaa5c43b /utils/test/result_collection_api/opnfv_testapi/tests/unit | |
parent | 9e24fcf1a2333e4bf65c1bf6e6c159071fab087c (diff) |
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 <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/opnfv_testapi/tests/unit')
-rw-r--r-- | utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py b/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py index e55696890..9b4d1208c 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tests/unit/fake_pymongo.py +++ b/utils/test/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): |