diff --git a/neon_utils/hana_utils.py b/neon_utils/hana_utils.py index d2edb345..971b1f05 100644 --- a/neon_utils/hana_utils.py +++ b/neon_utils/hana_utils.py @@ -105,7 +105,7 @@ def _get_token(backend_address: str): hana_config = Configuration().get('hana', {}) username = hana_config.get("username") or "guest" password = hana_config.get("password") or "password" - token_name = f"{gethostname()} {datetime.utcnow().isoformat()}" + token_name = f"{gethostname()}_{datetime.utcnow().isoformat()}" resp = requests.post(f"{backend_address}/auth/login", json={"username": username, "password": password, diff --git a/tests/hana_util_tests.py b/tests/hana_util_tests.py index 73bf883a..8effe5ab 100644 --- a/tests/hana_util_tests.py +++ b/tests/hana_util_tests.py @@ -112,7 +112,7 @@ def test_00_get_token(self, config, config_path): # Test with configured invalid login config.return_value = {"hana": {"username": "guest", - "password": "password"}} + "password": "fake_password"}} from neon_utils.hana_utils import ServerException with self.assertRaises(ServerException): _get_token(self.test_server)