Skip to content

Commit 9aa7ada

Browse files
PYTHON-1621 Modify change stream output example for manual (mongodb#370)
1 parent 88ab7ed commit 9aa7ada

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/test_examples.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,8 @@ def insert_docs():
695695

696696
# Start Changestream Example 4
697697
pipeline = [
698-
{"$match": {
699-
"$or": [
700-
{"fullDocument.username": "alice"},
701-
{"operationType": {"$in": ["delete"]}}]
702-
}
703-
}
698+
{'$match': {'fullDocument.username': 'alice'}},
699+
{'$addFields': {'newField': 'this is an added field!'}}
704700
]
705701
cursor = db.inventory.watch(pipeline=pipeline)
706702
document = next(cursor)

0 commit comments

Comments
 (0)