From 3acdb3068a3b9663c3ef8d724b8da444dc52c2b4 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 25 Jan 2014 10:59:38 -0500 Subject: [PATCH] Fixed a failing schema assertion. BooleanFields are stored as TINYINT(1) on MySQL. --- tests/schema/tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/schema/tests.py b/tests/schema/tests.py index 99805c45c7..450362ecda 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -209,7 +209,13 @@ class SchemaTests(TransactionTestCase): ) # Ensure the field is right afterwards columns = self.column_classes(Author) - self.assertEqual(columns['awesome'][0], "BooleanField") + # BooleanField are stored as TINYINT(1) on MySQL. + field_type, field_info = columns['awesome'] + if connection.vendor == 'mysql': + self.assertEqual(field_type, 'IntegerField') + self.assertEqual(field_info.precision, 1) + else: + self.assertEqual(field_type, 'BooleanField') def test_alter(self): """