Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a failing schema assertion.

BooleanFields are stored as TINYINT(1) on MySQL.
  • Loading branch information...
commit 3acdb3068a3b9663c3ef8d724b8da444dc52c2b4 1 parent b9e0ea3
@charettes charettes authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 tests/schema/tests.py
View
8 tests/schema/tests.py
@@ -209,7 +209,13 @@ def test_add_field_temp_default_boolean(self):
)
# 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):
"""

0 comments on commit 3acdb30

Please sign in to comment.
Something went wrong with that request. Please try again.