'Ensure that dynamic document plays nice with inheritance'

def test_inheritance(self):

    class Employee(self.Person, ):
        salary = IntField()
    Employee.drop_collection()
    self.assertTrue(('name' in Employee._fields))
    self.assertTrue(('salary' in Employee._fields))
    self.assertEqual(Employee._get_collection_name(), self.Person._get_collection_name())
    joe_bloggs = Employee()
    joe_bloggs.name = 'Joe    Bloggs'
    joe_bloggs.salary = 10
    joe_bloggs.age = 20
    joe_bloggs.save()
    self.assertEqual(1, self.Person.objects(age=20).count())
    self.assertEqual(1, Employee.objects(age=20).count())
    joe_bloggs = self.Person.objects.first()
    self.assertTrue(isinstance(joe_bloggs, Employee))
