File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
firestore/cloud-async-client Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,7 @@ async def update_document_increment(db):
788
788
# [START firestore_data_set_numeric_increment_async]
789
789
washington_ref = db .collection ("cities" ).document ("DC" )
790
790
791
- washington_ref .update ({"population" : firestore .Increment (50 )})
791
+ await washington_ref .update ({"population" : firestore .Increment (50 )})
792
792
# [END firestore_data_set_numeric_increment_async]
793
793
794
794
Original file line number Diff line number Diff line change @@ -305,5 +305,10 @@ async def test_collection_group_query(db):
305
305
}
306
306
307
307
308
+ async def test_update_document_increment (db ):
309
+ await db .collection ("cities" ).document ("DC" ).set ({"population" : 1 })
310
+ await snippets .update_document_increment (db )
311
+
312
+
308
313
async def test_list_document_subcollections ():
309
314
await snippets .list_document_subcollections ()
You can’t perform that action at this time.
0 commit comments