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 22
22
23
23
import snippets
24
24
25
+ # TODO(developer): Before running these tests locally,
26
+ # set your FIRESTORE_PROJECT env variable
27
+ # and create a Database named `(default)`
28
+
25
29
os .environ ["GOOGLE_CLOUD_PROJECT" ] = os .environ ["FIRESTORE_PROJECT" ]
26
30
27
31
UNIQUE_STRING = str (uuid .uuid4 ()).split ("-" )[0 ]
@@ -761,8 +765,12 @@ def test_delete_field(db):
761
765
762
766
763
767
def test_delete_full_collection (db ):
768
+ assert list (db .collection ("cities" ).stream ()) == []
769
+
764
770
for i in range (5 ):
765
771
db .collection ("cities" ).document (f"City{ i } " ).set ({"name" : f"CityName{ i } " })
772
+ assert len (list (db .collection ("cities" ).stream ())) == 5
773
+
766
774
snippets .delete_full_collection ()
767
775
assert list (db .collection ("cities" ).stream ()) == []
768
776
You can’t perform that action at this time.
0 commit comments