def subservient_to_runtime_overrides(self): env = self.env env.sudo_password = "******" config = Config.from_v1( env, overrides={"sudo": {"password": "******"}} ) assert config.sudo.password == "runtime"
def connect_kwargs_also_merged_with_imported_values(self): self.env["key_filename"] = "whatever" conf = Config.from_v1( self.env, overrides={"connect_kwargs": {"meh": "effort"}} ) assert conf.connect_kwargs["key_filename"] == "whatever" assert conf.connect_kwargs["meh"] == "effort"
def connect_kwargs_also_merged_with_imported_values(self): self.env["key_filename"] = "whatever" conf = Config.from_v1( self.env, overrides={"connect_kwargs": {"meh": "effort"}} ) assert conf.connect_kwargs["key_filename"] == "whatever" assert conf.connect_kwargs["meh"] == "effort"
def subservient_to_runtime_overrides(self): env = self.env env.sudo_password = "******" config = Config.from_v1( env, overrides={"sudo": {"password": "******"}} ) assert config.sudo.password == "runtime"
def forwards_arbitrary_kwargs_to_init(self): config = Config.from_v1( self.env, # Vanilla Invoke overrides={"some": "value"}, # Fabric system_ssh_path="/what/ever", ) assert config.some == "value" assert config._system_ssh_path == "/what/ever"
def forwards_arbitrary_kwargs_to_init(self): config = Config.from_v1( self.env, # Vanilla Invoke overrides={"some": "value"}, # Fabric system_ssh_path="/what/ever", ) assert config.some == "value" assert config._system_ssh_path == "/what/ever"
def must_be_given_explicit_env_arg(self): config = Config.from_v1( env=Lexicon(self.env, sudo_password="******") ) assert config.sudo.password == "sikrit"
def _conf(self, **kwargs): self.env.update(kwargs) return Config.from_v1(self.env)
def ssh_config_path(self): self.env.ssh_config_path = "/where/ever" config = Config.from_v1(self.env, lazy=True) assert config.ssh_config_path == "/where/ever"
def must_be_given_explicit_env_arg(self): config = Config.from_v1( env=Lexicon(self.env, sudo_password="******") ) assert config.sudo.password == "sikrit"
def _conf(self, **kwargs): self.env.update(kwargs) return Config.from_v1(self.env)
def ssh_config_path(self): self.env.ssh_config_path = "/where/ever" config = Config.from_v1(self.env, lazy=True) assert config.ssh_config_path == "/where/ever"