summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/tests/unit/fake_pymongo.py
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/fake_pymongo.py')
-rw-r--r--testapi/opnfv_testapi/tests/unit/fake_pymongo.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/fake_pymongo.py b/testapi/opnfv_testapi/tests/unit/fake_pymongo.py
index adaf6f7..04785d2 100644
--- a/testapi/opnfv_testapi/tests/unit/fake_pymongo.py
+++ b/testapi/opnfv_testapi/tests/unit/fake_pymongo.py
@@ -119,10 +119,14 @@ class MemDb(object):
@staticmethod
def _compare_date(spec, value):
+ gte = True
+ lt = False
for k, v in spec.iteritems():
- if k == '$gte' and value >= v:
- return True
- return False
+ if k == '$gte' and value < v:
+ gte = False
+ elif k == '$lt' and value < v:
+ lt = True
+ return gte and lt
def _in(self, content, *args):
if self.name == 'scenarios':