summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@oscaro.com>2014-06-06 00:26:40 +0200
committerAymeric Augustin <aymeric.augustin@oscaro.com>2014-06-06 00:26:40 +0200
commit1238f92c649ccd4ba99da0ce70be7597c90515d4 (patch)
tree9557fae80838d3dcee1eb8c66efe999a167c9f7a /tests
parent4ad299f287e6b8bc4ccd0ecbbfd1efcf4aca8251 (diff)
Checked can_introspect_null feature in a test.
Diffstat (limited to 'tests')
-rw-r--r--tests/inspectdb/tests.py10
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