Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 394b8aa

Browse filesBrowse files
fix(firestore): add dev note and asserts (GoogleCloudPlatform#13386)
1 parent bdfeec9 commit 394b8aa
Copy full SHA for 394b8aa

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎firestore/cloud-client/snippets_test.py

Copy file name to clipboardExpand all lines: firestore/cloud-client/snippets_test.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
import 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+
2529
os.environ["GOOGLE_CLOUD_PROJECT"] = os.environ["FIRESTORE_PROJECT"]
2630

2731
UNIQUE_STRING = str(uuid.uuid4()).split("-")[0]
@@ -761,8 +765,12 @@ def test_delete_field(db):
761765

762766

763767
def 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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.