mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #29461 -- Fixed ogrinspect test_time_field failure on SpatiaLite.
This commit is contained in:
parent
55f4eee75d
commit
666be7b994
@ -134,12 +134,20 @@ class OGRInspectTest(TestCase):
|
||||
))
|
||||
|
||||
# The ordering of model fields might vary depending on several factors (version of GDAL, etc.)
|
||||
self.assertIn(' f_decimal = models.DecimalField(max_digits=0, decimal_places=0)', model_def)
|
||||
if connection.vendor == 'sqlite':
|
||||
# SpatiaLite introspection is somewhat lacking (#29461).
|
||||
self.assertIn(' f_decimal = models.CharField(max_length=0)', model_def)
|
||||
else:
|
||||
self.assertIn(' f_decimal = models.DecimalField(max_digits=0, decimal_places=0)', model_def)
|
||||
self.assertIn(' f_int = models.IntegerField()', model_def)
|
||||
self.assertIn(' f_datetime = models.DateTimeField()', model_def)
|
||||
self.assertIn(' f_time = models.TimeField()', model_def)
|
||||
self.assertIn(' f_float = models.FloatField()', model_def)
|
||||
self.assertIn(' f_char = models.CharField(max_length=10)', model_def)
|
||||
if connection.vendor == 'sqlite':
|
||||
self.assertIn(' f_float = models.CharField(max_length=0)', model_def)
|
||||
else:
|
||||
self.assertIn(' f_float = models.FloatField()', model_def)
|
||||
max_length = 0 if connection.vendor == 'sqlite' else 10
|
||||
self.assertIn(' f_char = models.CharField(max_length=%s)' % max_length, model_def)
|
||||
self.assertIn(' f_date = models.DateField()', model_def)
|
||||
|
||||
# Some backends may have srid=-1
|
||||
|
Loading…
Reference in New Issue
Block a user