Kaydet (Commit) 5c95a553 authored tarafından Aymeric Augustin's avatar Aymeric Augustin

Checked can_introspect_null feature in a test.

Forward-port of 1238f92c from stable/1.7.x.
üst 484f3edf
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment