From: Alfredo Deza Date: Tue, 17 Mar 2015 17:38:09 +0000 (-0400) Subject: tests for the new keys to attrs helper X-Git-Tag: v1.2.2~6^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ce2b4f9a8bcc4a26a066391fe52c6708da819a1;p=radosgw-agent.git tests for the new keys to attrs helper Signed-off-by: Alfredo Deza --- diff --git a/radosgw_agent/tests/util/test_obj.py b/radosgw_agent/tests/util/test_obj.py index 3d07431..f25c8aa 100644 --- a/radosgw_agent/tests/util/test_obj.py +++ b/radosgw_agent/tests/util/test_obj.py @@ -30,3 +30,11 @@ class TestToDict(object): result = obj.to_dict(Empty(), a=1, b=2) assert result['a'] == 1 assert result['b'] == 2 + + +class TestKeysToAttribute(object): + + def test_replace_dashes(self): + dictionary = {'dashed-word': 1} + result = obj.keys_to_attributes(dictionary) + assert result.dashed_word == 1