Ensure that indexes are created automatically for GeoPointFields.
(self)
| 290 | Location(loc=[[[[1, 2], [3, 4], [5, 6], [1, 2]]]]).validate() |
| 291 | |
| 292 | def test_indexes_geopoint(self): |
| 293 | """Ensure that indexes are created automatically for GeoPointFields.""" |
| 294 | |
| 295 | class Event(Document): |
| 296 | title = StringField() |
| 297 | location = GeoPointField() |
| 298 | |
| 299 | geo_indicies = Event._geo_indices() |
| 300 | assert geo_indicies == [{"fields": [("location", "2d")]}] |
| 301 | |
| 302 | def test_geopoint_embedded_indexes(self): |
| 303 | """Ensure that indexes are created automatically for GeoPointFields on |
nothing calls this directly
no test coverage detected