'Testing to_python returns a correct GEOSGeometry object or
a ValidationError'

def test04_to_python(self):

    fld = forms.GeometryField()
    for wkt in ('POINT(5    23)', 'MULTIPOLYGON(((0    0,    0    1,    1    1,    1    0,    0    0)))', 'LINESTRING(0    0,    1    1)'):
        self.assertEqual(GEOSGeometry(wkt), fld.to_python(wkt))
    for wkt in ('POINT(5)', 'MULTI            POLYGON(((0    0,    0    1,    1    1,    1    0,    0    0)))', 'BLAH(0    0,    1    1)'):
        self.assertRaises(forms.ValidationError, fld.to_python, wkt)
