diff options
| author | Aymeric Augustin <aymeric.augustin@oscaro.com> | 2014-06-06 00:26:40 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@oscaro.com> | 2014-06-06 00:31:51 +0200 |
| commit | 5c95a55330bc2531405700a399bfb555bfe80120 (patch) | |
| tree | ebd2934ab07d8aafddf26286b63ec61465b9673c | |
| parent | 484f3edf1e79388f73dcb07e39d79d0c5029ae9e (diff) | |
Checked can_introspect_null feature in a test.
Forward-port of 1238f92c from stable/1.7.x.
| -rw-r--r-- | tests/inspectdb/tests.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 3e587e45bd..d848c137dc 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -89,10 +89,16 @@ class InspectDBTestCase(TestCase): if connection.features.can_introspect_boolean_field: assertFieldType('bool_field', "models.BooleanField()") - assertFieldType('null_bool_field', "models.NullBooleanField()") + if connection.features.can_introspect_null: + assertFieldType('null_bool_field', "models.NullBooleanField()") + else: + assertFieldType('null_bool_field', "models.BooleanField()") else: assertFieldType('bool_field', "models.IntegerField()") - assertFieldType('null_bool_field', "models.IntegerField(blank=True, null=True)") + if connection.features.can_introspect_null: + assertFieldType('null_bool_field', "models.IntegerField(blank=True, null=True)") + else: + assertFieldType('null_bool_field', "models.IntegerField()") if connection.vendor == 'sqlite': # Guessed arguments on SQLite, see #5014 |
