# Path: teuthology/config.py
# def init_logging():
#     def __init__(self, yaml_path=None):
#     def load(self, conf=None):
#     def update(self, in_dict):
#     def from_dict(cls, in_dict):
#     def to_dict(self):
#     def from_str(cls, in_str):
#     def to_str(self):
#     def get(self, key, default=None):
#     def __str__(self):
#     def __repr__(self):
#     def __getitem__(self, name):
#     def __getattr__(self, name):
#     def __contains__(self, name):
#     def __setattr__(self, name, value):
#     def __delattr__(self, name):
#     def __len__(self):
#     def __iter__(self):
#     def __setitem__(self, name, value):
#     def __delitem__(self, name):
#     def __init__(self, yaml_path=None):
#     def get_ceph_cm_ansible_git_url(self):
#     def get_ceph_qa_suite_git_url(self):
#     def get_ceph_git_url(self):
#     def __init__(self, config_dict=None):
#     def _clean_config(self, config_dict):
#     def __getattr__(self, name):
#     def __setattr__(self, name, value):
#     def __repr__(self):
#     def __str__(self):
# def set_config_attr(obj):
# def _get_config_path():
# class YamlConfig(collections.MutableMapping):
# class TeuthologyConfig(YamlConfig):
# class JobConfig(YamlConfig):
# class FakeNamespace(YamlConfig):


from mock import patch, Mock
from teuthology import config
from teuthology.orchestra import connection
from teuthology.orchestra.test.util import assert_raises



class TestConnection(object):
    def setup(self):
        self.start_patchers()

    def teardown(self):
        self.stop_patchers()

    def start_patchers(self):
        self.patcher_sleep = patch(
            'time.sleep',
        )
        self.patcher_sleep.start()
        self.m_ssh = Mock()
        self.patcher_ssh = patch(
            'teuthology.orchestra.connection.paramiko.SSHClient',
            self.m_ssh,
        )
        self.patcher_ssh.start()

    def stop_patchers(self):
        self.patcher_ssh.stop()
        self.patcher_sleep.stop()

    def clear_config(self):
        config.config.teuthology_yaml = ''

# Path: teuthology/config.py
# def init_logging():
#     def __init__(self, yaml_path=None):
#     def load(self, conf=None):
#     def update(self, in_dict):
#     def from_dict(cls, in_dict):
#     def to_dict(self):
#     def from_str(cls, in_str):
#     def to_str(self):
#     def get(self, key, default=None):
#     def __str__(self):
#     def __repr__(self):
#     def __getitem__(self, name):
#     def __getattr__(self, name):
#     def __contains__(self, name):
#     def __setattr__(self, name, value):
#     def __delattr__(self, name):
#     def __len__(self):
#     def __iter__(self):
#     def __setitem__(self, name, value):
#     def __delitem__(self, name):
#     def __init__(self, yaml_path=None):
#     def get_ceph_cm_ansible_git_url(self):
#     def get_ceph_qa_suite_git_url(self):
#     def get_ceph_git_url(self):
#     def __init__(self, config_dict=None):
#     def _clean_config(self, config_dict):
#     def __getattr__(self, name):
#     def __setattr__(self, name, value):
#     def __repr__(self):
#     def __str__(self):
# def set_config_attr(obj):
# def _get_config_path():
# class YamlConfig(collections.MutableMapping):
# class TeuthologyConfig(YamlConfig):
# class JobConfig(YamlConfig):
# class FakeNamespace(YamlConfig):


# Path: teuthology/orchestra/test/test_connection.py
from mock import patch, Mock
from teuthology import config
from teuthology.orchestra import connection
from teuthology.orchestra.test.util import assert_raises




class TestConnection(object):
    def setup(self):
        self.start_patchers()

    def teardown(self):
        self.stop_patchers()

    def start_patchers(self):
        self.patcher_sleep = patch(
            'time.sleep',
        )
        self.patcher_sleep.start()
        self.m_ssh = Mock()
        self.patcher_ssh = patch(
            'teuthology.orchestra.connection.paramiko.SSHClient',
            self.m_ssh,
        )
        self.patcher_ssh.start()

    def stop_patchers(self):
        self.patcher_ssh.stop()
        self.patcher_sleep.stop()

    def clear_config(self):
        config.config.teuthology_yaml = ''

        config.config.load()