How to use the testinfra.backend.base.BaseBackend function in testinfra

To help you get started, we’ve selected a few testinfra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github philpep / testinfra / test / test_backends.py View on Github external
def test_parse_hostspec(hostspec, expected):
    assert BaseBackend.parse_hostspec(hostspec) == expected
github philpep / testinfra / testinfra / backend / base.py View on Github external
def __init__(self, hostname, sudo=False, sudo_user=None, *args, **kwargs):
        self._encoding = None
        self._host = None
        self.hostname = hostname
        self.sudo = sudo
        self.sudo_user = sudo_user
        super(BaseBackend, self).__init__()