diff options
| author | Simon Charette <charette.s@gmail.com> | 2014-01-25 10:59:38 -0500 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2014-01-25 10:59:38 -0500 |
| commit | 3acdb3068a3b9663c3ef8d724b8da444dc52c2b4 (patch) | |
| tree | 917a663dc479c9eabe4bea24f45cae8b41af2e48 | |
| parent | b9e0ea3cb4ad25f767c77cb85a05f800aefda65b (diff) | |
Fixed a failing schema assertion.
BooleanFields are stored as TINYINT(1) on MySQL.
| -rw-r--r-- | tests/schema/tests.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): """ |
