Did I find the right examples for you? yes no

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

src/d/j/django-swingers-1.1.1/swingers/utils/tests.py   django-swingers(Download)
    def test_render_to_geojson(self):
        # TODO: could be more thorough
        from swingers.tests.models import GeoDuck
        out = render_to_geojson(GeoDuck.objects.all())
        self.assertEqual(out, '{"type": "FeatureCollection", "features": []}')
    def test_find_geom_field(self):
        from swingers.tests.models import GeoDuck
        field = find_geom_field(GeoDuck.objects.all())
        self.assertEqual(field, 'poly')
 
    def test_transform_geom(self):
        from swingers.tests.models import GeoDuck
        geo_duck = GeoDuck.objects.create(
            poly="SRID=28349;POLYGON ((110 1200, 120 1210, 120 1220, 130 1222,"
                 " 110 1200))")
    def test_text_location(self):
        from swingers.tests.models import GeoDuck
        geo_duck = GeoDuck.objects.create(
            poly="POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))")
        tl = text_location(geo_duck.poly)