def test_TargetFactory_parse_credentials(): login = '******' password = '******' config = Configuration({'login': login, 'password': password}) creds = TargetFactory.parse_credentials(config) assert creds.login == login assert creds.password == password
def test_TargetFactory_parse_credentials_should_work_with_empty_config(): creds = TargetFactory.parse_credentials(Configuration()) assert creds.login == 'root' assert creds.password is None