From: Alfredo Deza Date: Tue, 8 Jul 2014 14:10:45 +0000 (-0400) Subject: add tests for the executable not found exception X-Git-Tag: v1.5.8~5^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b11be61948ed81e17c76f0928b7fa36de58ad0f2;p=ceph-deploy.git add tests for the executable not found exception Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/tests/unit/test_exc.py b/ceph_deploy/tests/unit/test_exc.py new file mode 100644 index 0000000..cd38686 --- /dev/null +++ b/ceph_deploy/tests/unit/test_exc.py @@ -0,0 +1,16 @@ +from pytest import raises +from ceph_deploy import exc + + +class TestExecutableNotFound(object): + + def test_executable_is_used(self): + with raises(exc.DeployError) as error: + raise exc.ExecutableNotFound('vim', 'node1') + assert "'vim'" in str(error) + + def test_host_is_used(self): + with raises(exc.DeployError) as error: + raise exc.ExecutableNotFound('vim', 'node1') + assert "node1" in str(error) +