Skip to content

Commit 0b831cb

Browse files
committed
Fix some test failures on MongoDB 1.8
1 parent 503558e commit 0b831cb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/test_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ def test_find_and_modify(self):
21272127

21282128
# Test with full_response=True
21292129
# No lastErrorObject from mongos until 2.0
2130-
if (not is_mongos(self.db.connection) or
2130+
if (not is_mongos(self.db.connection) and
21312131
version.at_least(self.db.connection, (2, 0))):
21322132
result = c.find_and_modify({'_id': 1}, {'$inc': {'i': 1}},
21332133
new=True, upsert=True,

test/test_cursor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,8 @@ def test_with_statement(self):
10271027
def test_comment(self):
10281028
if is_mongos(self.client):
10291029
raise SkipTest("profile is not supported by mongos")
1030+
if not version.at_least(self.db.connection, (2, 0)):
1031+
raise SkipTest("Requires server >= 2.0")
10301032

10311033
def run_with_profiling(func):
10321034
self.db.set_profiling_level(OFF)

0 commit comments

Comments
 (0)