fix deprecated call to pymongo save() in tests

This commit is contained in:
Bastien Gérard 2019-02-23 22:37:32 +01:00
parent d65861cdf7
commit 5bbe782812

View File

@ -2758,7 +2758,7 @@ class InstanceTest(MongoDBTestCase):
User.drop_collection() User.drop_collection()
User._get_collection().save({ User._get_collection().insert_one({
'name': 'John', 'name': 'John',
'foo': 'Bar', 'foo': 'Bar',
'data': [1, 2, 3] 'data': [1, 2, 3]
@ -2774,7 +2774,7 @@ class InstanceTest(MongoDBTestCase):
User.drop_collection() User.drop_collection()
User._get_collection().save({ User._get_collection().insert_one({
'name': 'John', 'name': 'John',
'foo': 'Bar', 'foo': 'Bar',
'data': [1, 2, 3] 'data': [1, 2, 3]
@ -2797,7 +2797,7 @@ class InstanceTest(MongoDBTestCase):
User.drop_collection() User.drop_collection()
User._get_collection().save({ User._get_collection().insert_one({
'name': 'John', 'name': 'John',
'thing': { 'thing': {
'name': 'My thing', 'name': 'My thing',
@ -2820,7 +2820,7 @@ class InstanceTest(MongoDBTestCase):
User.drop_collection() User.drop_collection()
User._get_collection().save({ User._get_collection().insert_one({
'name': 'John', 'name': 'John',
'thing': { 'thing': {
'name': 'My thing', 'name': 'My thing',
@ -2843,7 +2843,7 @@ class InstanceTest(MongoDBTestCase):
User.drop_collection() User.drop_collection()
User._get_collection().save({ User._get_collection().insert_one({
'name': 'John', 'name': 'John',
'thing': { 'thing': {
'name': 'My thing', 'name': 'My thing',