def test_find_config_file_returns_defaultfile(self, mock_os_getcwd, mock_os_path_isfile): mock_os_getcwd.return_value = '/home/woohoo' mock_os_path_isfile.side_effect = [False, True, False] res = find_config_file() self.assertEquals(DEFAULT_CONF_PATH, res)
def test_find_config_file_returns_file_in_cwd(self, mock_os_getcwd, mock_os_path_isfile): mock_os_getcwd.return_value = '/home/woohoo' mock_os_path_isfile.return_value = True res = find_config_file() self.assertEquals('/home/woohoo/freezer-api.conf', res)