Skip to content

Commit

Permalink
Fix some test failures on MongoDB 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
behackett committed Feb 13, 2014
1 parent 503558e commit 0b831cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_collection.py
Expand Up @@ -2127,7 +2127,7 @@ def test_find_and_modify(self):

# Test with full_response=True
# No lastErrorObject from mongos until 2.0
if (not is_mongos(self.db.connection) or
if (not is_mongos(self.db.connection) and
version.at_least(self.db.connection, (2, 0))):
result = c.find_and_modify({'_id': 1}, {'$inc': {'i': 1}},
new=True, upsert=True,
Expand Down
2 changes: 2 additions & 0 deletions test/test_cursor.py
Expand Up @@ -1027,6 +1027,8 @@ def test_with_statement(self):
def test_comment(self):
if is_mongos(self.client):
raise SkipTest("profile is not supported by mongos")
if not version.at_least(self.db.connection, (2, 0)):
raise SkipTest("Requires server >= 2.0")

def run_with_profiling(func):
self.db.set_profiling_level(OFF)
Expand Down

0 comments on commit 0b831cb

Please sign in to comment.