def make_object(cls, **attrs):
 class TestObject(cls, ):
  "Class that inherits from the given class, but without __slots__.\n\n        Note that classes with __slots__ can't have arbitrary attributes monkey-\n        patched in, so this is a class that is exactly the same only with a\n        __dict__ instead of __slots__.\n        "
  pass
 TestObject.__name__ = ('TestObject_' + cls.__name__)
 obj = TestObject()
 for (name, value) in attrs.items():
  if (name == 'id'):
   sha = FixedSha(value)
   obj.sha = (lambda : sha)
  else:
   setattr(obj, name, value)
 return obj

def make_object ( cls , ** attrs ) : class TestObject ( cls , ) : pass TestObject . __name__ = ( 'TestObject_' + cls . __name__ ) obj = TestObject ( ) for ( name , value ) in attrs . items ( ) : if ( name == 'id' ) : sha = FixedSha ( value ) obj . sha = ( lambda : sha ) else : setattr ( obj , name , value ) return obj
make an object for testing and assign some members .