diff options
author | 2016-05-29 01:12:54 +0800 | |
---|---|---|
committer | 2016-05-29 01:24:21 +0800 | |
commit | da918db679b094948cf95670f0fa74a4528ee336 (patch) | |
tree | 95eb8fbea473454d0e4798364ab4b0119fce72f6 /result_collection_api/tests/unit/fake_pymongo.py | |
parent | 3a03a7efbdaf54fa5789c8d08119c7ac5b8f0a08 (diff) |
swagger-ize result-apis of testAPI
JIRA: FUNCTEST-270
Change-Id: I82b1e3acee82d9b4931531c9404e13a663ff32de
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'result_collection_api/tests/unit/fake_pymongo.py')
-rw-r--r-- | result_collection_api/tests/unit/fake_pymongo.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/result_collection_api/tests/unit/fake_pymongo.py b/result_collection_api/tests/unit/fake_pymongo.py index 40eb164..3494280 100644 --- a/result_collection_api/tests/unit/fake_pymongo.py +++ b/result_collection_api/tests/unit/fake_pymongo.py @@ -33,6 +33,8 @@ class MemDb(object): def _find_one(self, spec_or_id=None, *args): if spec_or_id is not None and not isinstance(spec_or_id, dict): spec_or_id = {"_id": spec_or_id} + if '_id' in spec_or_id: + spec_or_id['_id'] = str(spec_or_id['_id']) cursor = self._find(spec_or_id, *args) for result in cursor: return result |