cligj icon indicating copy to clipboard operation
cligj copied to clipboard

add invalid type validation and test

Open sofiapag opened this issue 2 years ago • 1 comments

The following incorrectly formatted geojson source will result in an internal server error:

{"type": "MultiPoint", "geometry": [[134.519974,34.084171],[134.546188,34.081322],[134.546219,34.078766],[134.542374,34.081287]]}
{"type": "MultiPoint", "geometry": [[130.405380,33.571598],[130.383682,33.567059],[130.486740,33.652233],[130.455490,33.597004],[130.437195,33.601784],[130.447998,33.654606],[130.409592,33.606941]]}

This PR adds an else case to catch invalid types and raise a TypeError

Note: looks like the python 3.7 build is failing, but it was in previous commits as well. I wonder why...

sofiapag avatar Jun 16 '22 04:06 sofiapag

Coverage Status

Coverage increased (+0.006%) to 99.225% when pulling dfd5fa366d60d1f44ea923faae748472b4e4b6c4 on add-type-check into 97f05d1b27286f202e24a46203e77be40bb9f852 on master.

coveralls avatar Jun 16 '22 04:06 coveralls