mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Replaced an explicit vendor check by a feature flag.
Forward-port of c9aedce0
from stable/1.7.x.
This commit is contained in:
parent
5c95a55330
commit
e071f67b7f
3 changed files with 7 additions and 4 deletions
|
@ -100,13 +100,12 @@ class InspectDBTestCase(TestCase):
|
|||
else:
|
||||
assertFieldType('null_bool_field', "models.IntegerField()")
|
||||
|
||||
if connection.vendor == 'sqlite':
|
||||
# Guessed arguments on SQLite, see #5014
|
||||
if connection.features.can_introspect_decimal_field:
|
||||
assertFieldType('decimal_field', "models.DecimalField(max_digits=6, decimal_places=1)")
|
||||
else: # Guessed arguments on SQLite, see #5014
|
||||
assertFieldType('decimal_field', "models.DecimalField(max_digits=10, decimal_places=5) "
|
||||
"# max_digits and decimal_places have been guessed, "
|
||||
"as this database handles decimal fields as float")
|
||||
else:
|
||||
assertFieldType('decimal_field', "models.DecimalField(max_digits=6, decimal_places=1)")
|
||||
|
||||
assertFieldType('float_field', "models.FloatField()")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue