From 734ce71824180740f2318750ae2436f4b60c30b1 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 5 Dec 2018 13:47:40 -0500 Subject: [PATCH] Refs #30013 -- Fixed SchemaEditor.quote_value() test for mysqlclient 1.3.14+. --- tests/backends/mysql/test_schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/backends/mysql/test_schema.py b/tests/backends/mysql/test_schema.py index 39a66fdfd7..27c24df4ee 100644 --- a/tests/backends/mysql/test_schema.py +++ b/tests/backends/mysql/test_schema.py @@ -7,11 +7,12 @@ from django.test import TestCase @unittest.skipUnless(connection.vendor == 'mysql', 'MySQL tests') class SchemaEditorTests(TestCase): def test_quote_value(self): + import MySQLdb editor = connection.schema_editor() tested_values = [ ('string', "'string'"), (42, '42'), - (1.754, '1.754'), + (1.754, '1.754e0' if MySQLdb.version_info >= (1, 3, 14) else '1.754'), (False, '0'), ] for value, expected in tested_values: