From 79bbb84a77ed432480c819975c1f40dbdb0788f5 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 19 Aug 2013 16:55:10 -0400 Subject: [PATCH] some tests to excercise the code Signed-off-by: Alfredo Deza --- ceph_deploy/tests/unit/hosts/test_hosts.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ceph_deploy/tests/unit/hosts/test_hosts.py b/ceph_deploy/tests/unit/hosts/test_hosts.py index ac087c0..4b67f04 100644 --- a/ceph_deploy/tests/unit/hosts/test_hosts.py +++ b/ceph_deploy/tests/unit/hosts/test_hosts.py @@ -53,3 +53,19 @@ class TestGetDistro(object): def test_get_fallback(self): result = hosts._get_distro('Solaris', 'Debian') assert result.__name__.endswith('debian') + + +class TestDetectPackageManagers(object): + + def test_centos_is_yum(self): + result = hosts.detect_package_manager('centos') + assert result is 'yum' + + def test_scientific_is_yum(self): + result = hosts.detect_package_manager('scientific') + assert result is 'yum' + + def test_redhat_is_yum(self): + result = hosts.detect_package_manager('redhat') + assert result is 'yum' + -- 2.47.3