'Helper test method ensuring given point field class works
well in an embedded document.'

def _test_embedded(self, point_field_class):

    class Venue(EmbeddedDocument, ):
        location = point_field_class()
        name = StringField()
    class Event(Document, ):
        title = StringField()
        venue = EmbeddedDocumentField(Venue)
    Event.drop_collection()
    venue1 = Venue(name='The    Rock', location=[(-87.677137), 41.909889])
    venue2 = Venue(name='The    Bridge', location=[(-122.4194155), 37.7749295])
    event1 = Event(title='Coltrane    Motion    @    Double    Door', venue=venue1).save()
    event2 = Event(title='Coltrane    Motion    @    Bottom    of    the    Hill', venue=venue2).save()
    event3 = Event(title='Coltrane    Motion    @    Empty    Bottle', venue=venue1).save()
    events = Event.objects(venue__location__near=[(-87.67892), 41.9120459])
    self.assertEqual(events.count(), 3)
    self.assertEqual(list(events), [event1, event3, event2])
