'Ensure the "within_polygon" operator works.'

def test_within_polygon(self):

    (event1, event2, event3) = self._create_event_data()
    polygon = [((-87.694445), 41.912114), ((-87.69084), 41.919395), ((-87.681742), 41.927186), ((-87.654276), 41.911731), ((-87.656164), 41.898061)]
    events = self.Event.objects(location__within_polygon=polygon)
    self.assertEqual(events.count(), 1)
    self.assertEqual(events[0].id, event1.id)
    polygon2 = [((-1.742249), 54.033586), ((-1.225891), 52.792797), ((-4.40094), 53.389881)]
    events = self.Event.objects(location__within_polygon=polygon2)
    self.assertEqual(events.count(), 0)
