mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	Refs #30013 -- Fixed SchemaEditor.quote_value() test for mysqlclient 1.3.14+.
This commit is contained in:
		| @@ -7,11 +7,12 @@ from django.test import TestCase | |||||||
| @unittest.skipUnless(connection.vendor == 'mysql', 'MySQL tests') | @unittest.skipUnless(connection.vendor == 'mysql', 'MySQL tests') | ||||||
| class SchemaEditorTests(TestCase): | class SchemaEditorTests(TestCase): | ||||||
|     def test_quote_value(self): |     def test_quote_value(self): | ||||||
|  |         import MySQLdb | ||||||
|         editor = connection.schema_editor() |         editor = connection.schema_editor() | ||||||
|         tested_values = [ |         tested_values = [ | ||||||
|             ('string', "'string'"), |             ('string', "'string'"), | ||||||
|             (42, '42'), |             (42, '42'), | ||||||
|             (1.754, '1.754'), |             (1.754, '1.754e0' if MySQLdb.version_info >= (1, 3, 14) else '1.754'), | ||||||
|             (False, '0'), |             (False, '0'), | ||||||
|         ] |         ] | ||||||
|         for value, expected in tested_values: |         for value, expected in tested_values: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user