'Ensure that the MapField handles the declared type.'

def test_mapfield(self):

    class Simple(Document, ):
        mapping = MapField(IntField())
    Simple.drop_collection()
    e = Simple()
    e.mapping['someint'] = 1
    e.save()
    with self.assertRaises(ValidationError):
        e.mapping['somestring'] = 'abc'
        e.save()
    with self.assertRaises(ValidationError):
        class NoDeclaredType(Document, ):
            mapping = MapField()
