Skip to content

PYTHON-4806 Fix expected metadata in mockupdb tests #1888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ features = ["test"]
test = "pytest -v --durations=5 --maxfail=10 {args}"
test-eg = "bash ./.evergreen/run-tests.sh {args}"
test-async = "pytest -v --durations=5 --maxfail=10 -m default_async {args}"
test-mockupdb = ["pip install -U git+https://github.com/ajdavis/mongo-mockup-db@master", "test -m mockupdb"]
test-mockupdb = ["pip install -U git+https://github.com/mongodb-labs/mongo-mockup-db@master", "test -m mockupdb"]

[envs.encryption]
skip-install = true
Expand Down
8 changes: 6 additions & 2 deletions test/mockupdb/test_handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


from bson.objectid import ObjectId
from pymongo import MongoClient
from pymongo import MongoClient, has_c
from pymongo import version as pymongo_version
from pymongo.errors import OperationFailure
from pymongo.server_api import ServerApi, ServerApiVersion
Expand All @@ -39,7 +39,11 @@ def _check_handshake_data(request):
data = request["client"]

assert data["application"] == {"name": "my app"}
assert data["driver"] == {"name": "PyMongo", "version": pymongo_version}
if has_c():
name = "PyMongo|c"
else:
name = "PyMongo"
assert data["driver"] == {"name": name, "version": pymongo_version}

# Keep it simple, just check these fields exist.
assert "os" in data
Expand Down
Loading