File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2222
2323import snippets
2424
25+ # TODO(developer): Before running these tests locally,
26+ # set your FIRESTORE_PROJECT env variable
27+ # and create a Database named `(default)`
28+
2529os .environ ["GOOGLE_CLOUD_PROJECT" ] = os .environ ["FIRESTORE_PROJECT" ]
2630
2731UNIQUE_STRING = str (uuid .uuid4 ()).split ("-" )[0 ]
@@ -761,8 +765,12 @@ def test_delete_field(db):
761765
762766
763767def test_delete_full_collection (db ):
768+ assert list (db .collection ("cities" ).stream ()) == []
769+
764770 for i in range (5 ):
765771 db .collection ("cities" ).document (f"City{ i } " ).set ({"name" : f"CityName{ i } " })
772+ assert len (list (db .collection ("cities" ).stream ())) == 5
773+
766774 snippets .delete_full_collection ()
767775 assert list (db .collection ("cities" ).stream ()) == []
768776
You can’t perform that action at this time.
0 commit comments