Skip to content

Commit

Permalink
fix: count_document issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mumarkhan999 committed Apr 26, 2024
1 parent 591010d commit 218b310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
os: [ubuntu-20.04]
python-version:
- "3.8"
- '3.11'
# - '3.11'
toxenv: [celery53-django42]

steps:
Expand Down
5 changes: 3 additions & 2 deletions eventtracking/backends/tests/test_mongodb_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def test_sequential_events(self):
mem_events[event['data']['sequence']] = event
self.assertEqual(len(mem_events), 10)

cursor = self.mongo_backend.collection.find()
self.assertEqual(cursor.count_documents({}), 10)
collection = self.mongo_backend.collection
cursor = collection.find()
self.assertEqual(collection.count_documents({}), 10)

for event in cursor:
mem_event = mem_events[event['data']['sequence']]
Expand Down

0 comments on commit 218b310

Please sign in to comment.