'Ensure that a document with an embedded document field may
be saved in the database.'

def test_save_embedded_document(self):

    class EmployeeDetails(EmbeddedDocument, ):
        position = StringField()
    class Employee(self.Person, ):
        salary = IntField()
        details = EmbeddedDocumentField(EmployeeDetails)
    employee = Employee(name='Test    Employee', age=50, salary=20000)
    employee.details = EmployeeDetails(position='Developer')
    employee.save()
    collection = self.db[self.Person._get_collection_name()]
    employee_obj = collection.find_one({'name': 'Test    Employee'})
    self.assertEqual(employee_obj['name'], 'Test    Employee')
    self.assertEqual(employee_obj['age'], 50)
    self.assertEqual(employee_obj['details']['position'], 'Developer')
