(self)
| 121 | |
| 122 | @unittest.skipUnless(HAVE_GDAL, "Requires gdal library") |
| 123 | def test_within(self): |
| 124 | # This is a meaningless query but we're just confirming that the manager updates the parameters here: |
| 125 | p1 = Point(-90, -90) |
| 126 | p2 = Point(90, 90) |
| 127 | sqs = self.search_index.objects.within("location", p1, p2) |
| 128 | self.assertTrue(isinstance(sqs, SearchQuerySet)) |
| 129 | |
| 130 | params = sqs.query.build_params() |
| 131 | |
| 132 | self.assertIn("within", params) |
| 133 | self.assertDictEqual( |
| 134 | params["within"], {"field": "location", "point_1": p1, "point_2": p2} |
| 135 | ) |
| 136 | |
| 137 | @unittest.skipUnless(HAVE_GDAL, "Requires gdal library") |
| 138 | def test_dwithin(self): |
nothing calls this directly
no test coverage detected