'Testing GML output from the database using GeoQuerySet.gml().'

def test03b_gml(self):

    if (mysql or spatialite):
        self.assertRaises(NotImplementedError, Country.objects.all().gml, field_name='mpoly')
        return
    qs = City.objects.all()
    self.assertRaises(TypeError, qs.gml, field_name='name')
    ptown1 = City.objects.gml(field_name='point', precision=9).get(name='Pueblo')
    ptown2 = City.objects.gml(precision=9).get(name='Pueblo')
    if oracle:
        gml_regex = re.compile('^<gml:Point    srsName="SDO:4326"    xmlns:gml="http://www.opengis.net/gml"><gml:coordinates    decimal="\\."    cs=","    ts="    ">-104.60925\\d+,38.25500\\d+    </gml:coordinates></gml:Point>')
        for ptown in [ptown1, ptown2]:
            self.assertTrue(gml_regex.match(ptown.gml))
    else:
        gml_regex = re.compile('^<gml:Point    srsName="EPSG:4326"><gml:coordinates>-104\\.60925\\d+,38\\.255001</gml:coordinates></gml:Point>')
        for ptown in [ptown1, ptown2]:
            self.assertTrue(gml_regex.match(ptown.gml))
