From da918db679b094948cf95670f0fa74a4528ee336 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Sun, 29 May 2016 01:12:54 +0800 Subject: swagger-ize result-apis of testAPI JIRA: FUNCTEST-270 Change-Id: I82b1e3acee82d9b4931531c9404e13a663ff32de Signed-off-by: SerenaFeng --- result_collection_api/tests/unit/fake_pymongo.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'result_collection_api/tests/unit/fake_pymongo.py') 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 -- cgit 1.2.3-korg