diff options
author | 2016-05-29 01:12:54 +0800 | |
---|---|---|
committer | 2016-05-29 01:24:21 +0800 | |
commit | 534ca019931d48a2a5f4075c0ca36b501d8f793d (patch) | |
tree | 6d1dc0b1ecdee7e802b9767d8c9874154c537127 /utils/test/result_collection_api/tests/unit/fake_pymongo.py | |
parent | abf00874c02f5c9776368473081a420d6496c049 (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 'utils/test/result_collection_api/tests/unit/fake_pymongo.py')
-rw-r--r-- | utils/test/result_collection_api/tests/unit/fake_pymongo.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/test/result_collection_api/tests/unit/fake_pymongo.py b/utils/test/result_collection_api/tests/unit/fake_pymongo.py index 40eb164db..3494280fa 100644 --- a/utils/test/result_collection_api/tests/unit/fake_pymongo.py +++ b/utils/test/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 |