Skip to content

Commit db4aadb

Browse files
committed
SupportsQueryableEncryptionTests require MongoDB 8
1 parent cc2c151 commit db4aadb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/backend_/test_features.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,24 @@ def non_enterprise_response(command):
6969
raise Exception("Unexpected command")
7070

7171
def test_supported_on_atlas(self):
72-
"""Supported on MongoDB 7.0+ Atlas replica set or sharded cluster."""
72+
"""Supported on MongoDB 8.0+ Atlas replica set or sharded cluster."""
7373
with (
7474
patch(
7575
"pymongo.synchronous.database.Database.command", wraps=self.non_enterprise_response
7676
),
7777
patch("django.db.connection.features.supports_atlas_search", True),
7878
patch("django.db.connection.features._supports_transactions", True),
79-
patch("django.db.connection.features.is_mongodb_7_0", True),
79+
patch("django.db.connection.features.is_mongodb_8_0", True),
8080
):
8181
self.assertIs(connection.features.supports_queryable_encryption, True)
8282

8383
def test_supported_on_enterprise(self):
84-
"""Supported on MongoDB 7.0+ Enterprise replica set or sharded cluster."""
84+
"""Supported on MongoDB 8.0+ Enterprise replica set or sharded cluster."""
8585
with (
8686
patch("pymongo.synchronous.database.Database.command", wraps=self.enterprise_response),
8787
patch("django.db.connection.features.supports_atlas_search", False),
8888
patch("django.db.connection.features._supports_transactions", True),
89-
patch("django.db.connection.features.is_mongodb_7_0", True),
89+
patch("django.db.connection.features.is_mongodb_8_0", True),
9090
):
9191
self.assertIs(connection.features.supports_queryable_encryption, True)
9292

@@ -98,7 +98,7 @@ def test_atlas_or_enterprise_required(self):
9898
),
9999
patch("django.db.connection.features.supports_atlas_search", False),
100100
patch("django.db.connection.features._supports_transactions", True),
101-
patch("django.db.connection.features.is_mongodb_7_0", True),
101+
patch("django.db.connection.features.is_mongodb_8_0", True),
102102
):
103103
self.assertIs(connection.features.supports_queryable_encryption, False)
104104

@@ -111,16 +111,16 @@ def test_transactions_required(self):
111111
patch("pymongo.synchronous.database.Database.command", wraps=self.enterprise_response),
112112
patch("django.db.connection.features.supports_atlas_search", False),
113113
patch("django.db.connection.features._supports_transactions", False),
114-
patch("django.db.connection.features.is_mongodb_7_0", True),
114+
patch("django.db.connection.features.is_mongodb_8_0", True),
115115
):
116116
self.assertIs(connection.features.supports_queryable_encryption, False)
117117

118-
def test_mongodb_7_0_required(self):
119-
"""Not supported on MongoDB < 7.0"""
118+
def test_mongodb_8_0_required(self):
119+
"""Not supported on MongoDB < 8.0"""
120120
with (
121121
patch("pymongo.synchronous.database.Database.command", wraps=self.enterprise_response),
122122
patch("django.db.connection.features.supports_atlas_search", False),
123123
patch("django.db.connection.features._supports_transactions", True),
124-
patch("django.db.connection.features.is_mongodb_7_0", False),
124+
patch("django.db.connection.features.is_mongodb_8_0", False),
125125
):
126126
self.assertIs(connection.features.supports_queryable_encryption, False)

0 commit comments

Comments
 (0)