]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
rename the helper to to_obj
authorAlfredo Deza <adeza@redhat.com>
Tue, 17 Mar 2015 17:43:09 +0000 (13:43 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 17 Mar 2015 17:43:09 +0000 (13:43 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/tests/util/test_obj.py
radosgw_agent/util/obj.py

index f25c8aa98c9c18096827b5830dc86c70f1241783..e3e35750383f057ff6e5e99d8961dc63fc98f8af 100644 (file)
@@ -36,5 +36,5 @@ class TestKeysToAttribute(object):
 
     def test_replace_dashes(self):
         dictionary = {'dashed-word': 1}
-        result = obj.keys_to_attributes(dictionary)
+        result = obj.to_obj(dictionary)
         assert result.dashed_word == 1
index 09ffbda54cf982de73c581c1ef0431efecbd9d55..e170fb6f0eb2c60163bc5bc56b70250021b001ff 100644 (file)
@@ -22,7 +22,7 @@ def to_dict(_object, **extra_keys):
     return dictified_obj
 
 
-def keys_to_attributes(dictionary, name="BucketEntry"):
+def to_obj(dictionary, name="BucketEntry"):
     """
     Because some objects are dynamic, we are forced to skip namedtuples
     and set the attributes from keys in dictionaries so that accessing them