'Going to test reported issue:
https://github.com/MongoEngine/mongoengine/issues/654
where the reporter asks for the availability to perform
a to_json with the original class names and not the abreviated
mongodb document keys'

def test_json_names(self):

    class Embedded(EmbeddedDocument, ):
        string = StringField(db_field='s')
    class Doc(Document, ):
        string = StringField(db_field='s')
        embedded = EmbeddedDocumentField(Embedded, db_field='e')
    doc = Doc(string='Hello', embedded=Embedded(string='Inner    Hello'))
    doc_json = doc.to_json(sort_keys=True, use_db_field=False, separators=(',', ':'))
    expected_json = '{"embedded":{"string":"Inner    Hello"},"string":"Hello"}'
    self.assertEqual(doc_json, expected_json)
