From: Alfredo Deza Date: Thu, 28 May 2015 14:01:20 +0000 (-0400) Subject: [RM-11788] create a bare class for testing strict attributes X-Git-Tag: v1.5.26~19^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f9236a63f106aef86a948ac984de64103b377f3;p=ceph-deploy.git [RM-11788] create a bare class for testing strict attributes Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/tests/util.py b/ceph_deploy/tests/util.py index 88af892..2513de6 100644 --- a/ceph_deploy/tests/util.py +++ b/ceph_deploy/tests/util.py @@ -18,4 +18,11 @@ def generate_ips(start_ip, end_ip): return ip_range - +class Empty(object): + """ + A bare class, with explicit behavior for key/value items to be set at + instantiation. + """ + def __init__(self, **kw): + for k, v in kw.items(): + setattr(self, k, v)