From: Alfredo Deza Date: Wed, 11 Feb 2015 16:05:56 +0000 (-0500) Subject: tests for the new acl helper in radosgw_admin X-Git-Tag: v0.94.10~27^2^2~146 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=20a1ae72ef96aba9c40b689c744013ab04d231b0;p=ceph.git tests for the new acl helper in radosgw_admin Signed-off-by: Alfredo Deza (cherry picked from commit 3801ac9357f78ac05fa850d8944651f26c556d68) --- diff --git a/tasks/test/test_radosgw_admin.py b/tasks/test/test_radosgw_admin.py new file mode 100644 index 00000000000..59f357891ca --- /dev/null +++ b/tasks/test/test_radosgw_admin.py @@ -0,0 +1,31 @@ +from mock import Mock + +from .. import radosgw_admin + +acl_with_version = """fooFoofooFooFULL_CONTROL +""" # noqa + + +acl_without_version = """fooFoofooFooFULL_CONTROL +""" # noqa + + +class TestGetAcl(object): + + def setup(self): + self.key = Mock() + + def test_removes_xml_version(self): + self.key.get_xml_acl = Mock(return_value=acl_with_version) + result = radosgw_admin.get_acl(self.key) + assert result.startswith('