diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-30 19:28:13 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-30 19:28:13 +0200 |
| commit | 879b245baa727090e242c482a8f12ee52f169642 (patch) | |
| tree | 9f1a1b7abed63de810b48b7ce85e8fd5e82c6c6f /tests | |
| parent | fb3d916c201d5882098bbcc94f60765412ba7aff (diff) | |
Fixed #5725 -- Fixed varchar column size introspection for MySQL
Thanks ferdonline for the initial patch and Karen Tracey for the
related post on django-users.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/introspection/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py index e7cf7b9e1a..a54e0c670b 100644 --- a/tests/regressiontests/introspection/tests.py +++ b/tests/regressiontests/introspection/tests.py @@ -89,6 +89,11 @@ class IntrospectionTests(six.with_metaclass(IgnoreNotimplementedError, TestCase) [datatype(r[1], r) for r in desc], ['IntegerField', 'CharField', 'CharField', 'CharField', 'BigIntegerField'] ) + # Check also length of CharFields + self.assertEqual( + [r[3] for r in desc if datatype(r[1], r) == 'CharField'], + [30, 30, 75] + ) # Oracle forces null=True under the hood in some cases (see # https://docs.djangoproject.com/en/dev/ref/databases/#null-and-empty-strings) |
