'Test build_search_kwargs with dwithin range for Elasticsearch versions < 1.0.0'

def test_build_query_with_dwithin_range(self):

    search_kwargs = self.backend.build_search_kwargs(u'where', dwithin={u'field': u'location_field', u'point': Point(1.2345678, 2.3456789), u'distance': D(m=500)})
    self.assertEqual(search_kwargs[u'query'][u'filtered'][u'filter'][u'bool'][u'must'][1][u'geo_distance'], {u'distance': 0.5, u'location_field': {u'lat': 2.3456789, u'lon': 1.2345678}})
