From: Alfredo Deza Date: Fri, 20 Feb 2015 18:54:51 +0000 (-0500) Subject: create a test for the args sanitizer function X-Git-Tag: v1.5.22-rc1~2^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b6c3125c2acda43d8fb4149d42d0023f594b49b9;p=ceph-deploy.git create a test for the args sanitizer function Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/tests/test_install.py b/ceph_deploy/tests/test_install.py new file mode 100644 index 0000000..a18f94c --- /dev/null +++ b/ceph_deploy/tests/test_install.py @@ -0,0 +1,22 @@ +from mock import Mock + +from ceph_deploy import install + + +class TestSanitizeArgs(object): + + def setup(self): + self.args = Mock() + # set the default behavior we set in cli.py + self.args.default_release = False + + def test_args_release_not_specified(self): + self.args.release = None + result = install.sanitize_args(self.args) + # XXX + # we should get `args.release` to be the latest release + # but we don't want to be updating this test every single + # time there is a new default value, and we can't programatically + # change that. Future improvement: make the default release a + # variable in `ceph_deploy/__init__.py` + assert result.default_release is True