We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdfeec9 commit 394b8aaCopy full SHA for 394b8aa
1 file changed
firestore/cloud-client/snippets_test.py
@@ -22,6 +22,10 @@
22
23
import snippets
24
25
+# TODO(developer): Before running these tests locally,
26
+# set your FIRESTORE_PROJECT env variable
27
+# and create a Database named `(default)`
28
+
29
os.environ["GOOGLE_CLOUD_PROJECT"] = os.environ["FIRESTORE_PROJECT"]
30
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):
771
db.collection("cities").document(f"City{i}").set({"name": f"CityName{i}"})
772
+ assert len(list(db.collection("cities").stream())) == 5
773
774
snippets.delete_full_collection()
775
assert list(db.collection("cities").stream()) == []
776
0 commit comments