Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/plugins/windows/test_sethostname.py   cloudbase-init(Download)
 
        if hostname_exists is True:
            length = sethostname.NETBIOS_HOST_NAME_MAX_LEN
            hostname = new_hostname.split('.', 1)[0]
            if len(new_hostname) > length:
    def test_execute_hostname_to_be_truncated(self):
        self._test_execute(
            new_hostname_length=sethostname.NETBIOS_HOST_NAME_MAX_LEN + 1)
 
    def test_execute_no_truncate_needed(self):
        self._test_execute(
            new_hostname_length=sethostname.NETBIOS_HOST_NAME_MAX_LEN)