#NEWLINE# def test_time_field( self ) : #NEWLINE# #INDENT# if ( not connections [ 'default' ] . ops . postgis ) : #NEWLINE# #INDENT# self . skipTest ( "This database does not support 'ogrinspect'ion" ) #NEWLINE# #UNINDENT# ogr_db = get_ogr_db_string ( ) #NEWLINE# if ( not ogr_db ) : #NEWLINE# #INDENT# self . skipTest ( 'Your GDAL installation does not support PostGIS databases' ) #NEWLINE# #UNINDENT# model_def = ogrinspect ( ogr_db , 'Measurement' , layer_key = AllOGRFields . _meta . db_table , decimal = [ 'f_decimal' ] ) #NEWLINE# self . assertTrue ( model_def . startswith ( '# This is an auto-generated Django model module created by ogrinspect.\nfrom django.contrib.gis.db import models\n\nclass Measurement(models.Model):\n' ) ) #NEWLINE# self . assertIn ( '    f_decimal = models.DecimalField(max_digits=0, decimal_places=0)' , model_def ) #NEWLINE# self . assertIn ( '    f_int = models.IntegerField()' , ogr_db ) #NEWLINE# self . assertIn ( '    f_datetime = models.DateTimeField()' , model_def ) #NEWLINE# self . assertIn ( '    f_time = models.TimeField()' , model_def ) #NEWLINE# self . assertIn ( '    f_float = models.FloatField()' , model_def ) #NEWLINE# self . assertIn ( '    f_char = models.CharField(max_length=10)' , model_def ) #NEWLINE# self . assertIn ( '    f_date = models.DateField()' , model_def ) #NEWLINE# self . assertTrue ( model_def . endswith ( '    geom = models.PolygonField()\n    objects = models.GeoManager()' ) )