@@ -0,0 +1,1300 @@
+from mock import Mock, patch%0Afrom ceph_deploy import conf%0Afrom ceph_deploy.tests import fakes%0A%0A%0Aclass TestLocateOrCreate(object):%0A%0A    def setup(self):%0A        self.fake_write = Mock(name='fake_write')%0A        self.fake_file = fakes.mock_open(data=self.fake_write)%0A        self.fake_file.readline.return_value = self.fake_file%0A%0A    def test_no_conf(self):%0A        with patch('__builtin__.open', self.fake_file):%0A            conf.cephdeploy.location()%0A%0A        assert self.fake_file.called is True%0A        assert self.fake_file.call_args%5B0%5D%5B0%5D.endswith('/.cephdeploy.conf')%0A%0A    def test_cwd_conf_exists(self):%0A        fake_path = Mock()%0A        fake_path.join = Mock(return_value='/srv/cephdeploy.conf')%0A        fake_path.exists = Mock(return_value=True)%0A        with patch('ceph_deploy.conf.cephdeploy.path', fake_path):%0A            result = conf.cephdeploy.location()%0A%0A        assert result == '/srv/cephdeploy.conf'%0A%0A    def test_home_conf_exists(self):%0A        fake_path = Mock()%0A        fake_path.expanduser = Mock(return_value='/home/alfredo/.cephdeploy.conf')%0A        fake_path.exists = Mock(side_effect=%5BFalse, True%5D)%0A        with patch('ceph_deploy.conf.cephdeploy.path', fake_path):%0A            result = conf.cephdeploy.location()%0A%0A        assert result == '/home/alfredo/.cephdeploy.conf'%0A

create tests for the new conf utils