'Ensure that embedded documents can reference parent instance.'

def test_embedded_document_instance(self):

    class Embedded(EmbeddedDocument, ):
        string = StringField()
    class Doc(Document, ):
        embedded_field = EmbeddedDocumentField(Embedded)
    Doc.drop_collection()
    doc = Doc(embedded_field=Embedded(string='Hi'))
    self.assertHasInstance(doc.embedded_field, doc)
    doc.save()
    doc = Doc.objects.get()
    self.assertHasInstance(doc.embedded_field, doc)
