cms.test_utils.util.mock: 11 total statements, 0.0% covered

Generated: Wed 2013-03-13 10:33 CET

Source file: /media/Envs/Envs/filer-gallery/lib/python2.7/site-packages/cms/test_utils/util/mock.py

Stats: 0 executed, 11 missed, 0 excluded, 7 ignored

  1. class AttributeObject(object):
  2. """
  3. mock = AttributeObject(hello='world')
  4. mock.hello # 'world'
  5. """
  6. def __init__(self, **kwargs):
  7. self.kwargs = kwargs
  8. for key, value in kwargs.items():
  9. setattr(self, key, value)
  10. def __repr__(self):
  11. return '<AttributeObject: %r>' % self.kwargs
  12. class DefaultAttributeObject(AttributeObject):
  13. def __init__(self, default, **kwargs):
  14. self.__default = default
  15. super(DefaultAttributeObject, self).__init__(**kwargs)