Skip to content

Commit a76aead

Browse files
committed
Fix test_param_conversion for Django 4.1 and mysql
1 parent e4b4529 commit a76aead

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/panels/test_sql.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ def test_param_conversion(self):
138138
# ensure query was logged
139139
self.assertEqual(len(self.panel._queries), 3)
140140

141-
if django.VERSION >= (3, 1):
141+
if (
142+
django.VERSION >= (3, 1)
143+
# Django 4.1 started passing true/false back for boolean
144+
# comparisons in MySQL.
145+
and not (django.VERSION >= (4, 1) and connection.vendor == "mysql")
146+
):
142147
self.assertEqual(
143148
tuple([q[1]["params"] for q in self.panel._queries]),
144149
('["Foo"]', "[10, 1]", '["2017-12-22 16:07:01"]'),

0 commit comments

Comments
 (0)