diff options
| author | Tim Graham <timograham@gmail.com> | 2018-12-05 13:47:40 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-05 15:10:36 -0500 |
| commit | 389ef05b1b74dcebcaf5b6885a9ff00ceccdb737 (patch) | |
| tree | 06627b406afb7842867bc27e7175b4d4203119db | |
| parent | 108490692701f74a09e4852d1ba98514a38f94ae (diff) | |
[2.1.x] Refs #30013 -- Fixed SchemaEditor.quote_value() test for mysqlclient 1.3.14+.
Backport of 734ce71824180740f2318750ae2436f4b60c30b1 from master.
| -rw-r--r-- | tests/backends/mysql/test_schema.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |
