Skip to content

Commit 94f7027

Browse files
committed
Fix tests.
1 parent 8c33923 commit 94f7027

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

django_mongodb/indexes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def builtin_lookup_idx(self, compiler, connection):
4040
def in_idx(self, compiler, connection):
4141
if not connection.features.supports_in_index_operator:
4242
raise NotSupportedError(
43-
f"MongoDB < 6.0 does not support the {self.lookup_name} lookup in indexes."
43+
f"MongoDB < 6.0 does not support the '{self.lookup_name}' lookup in indexes."
4444
)
4545
return builtin_lookup_idx(self, compiler, connection)
4646

tests/indexes_/test_mql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_xor_not_supported(self):
3737

3838
@skipIfDBFeature("supports_in_index_operator")
3939
def test_or_not_supported(self):
40-
msg = "MongoDB does not support the 'Or' lookup in indexes."
40+
msg = "MongoDB < 6.0 does not support the '|' operator in indexes."
4141
with self.assertRaisesMessage(NotSupportedError, msg), connection.schema_editor() as editor:
4242
Index(
4343
name="test",
@@ -47,7 +47,7 @@ def test_or_not_supported(self):
4747

4848
@skipIfDBFeature("supports_in_index_operator")
4949
def test_in_not_supported(self):
50-
msg = "MongoDB does not support the 'in' lookup in indexes."
50+
msg = "MongoDB < 6.0 does not support the 'in' lookup in indexes."
5151
with self.assertRaisesMessage(NotSupportedError, msg), connection.schema_editor() as editor:
5252
Index(
5353
name="test",

0 commit comments

Comments
 (0)