From 328884bd58f46cad982f4229e789a194c2718f09 Mon Sep 17 00:00:00 2001 From: TimWang Date: Thu, 18 Jul 2024 20:21:58 +0800 Subject: [PATCH] fix test --- .../tests/unittests/auth/test_simple_auth_provider.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/client-python/tests/unittests/auth/test_simple_auth_provider.py b/clients/client-python/tests/unittests/auth/test_simple_auth_provider.py index 45f7c14882c..c7e7fdc390f 100644 --- a/clients/client-python/tests/unittests/auth/test_simple_auth_provider.py +++ b/clients/client-python/tests/unittests/auth/test_simple_auth_provider.py @@ -40,6 +40,9 @@ def test_auth_provider(self): ).decode("utf-8") self.assertEqual(f"{user}:dummy", token_string) + original_gravitino_user = ( + os.environ["GRAVITINO_USER"] if "GRAVITINO_USER" in os.environ else "" + ) os.environ["GRAVITINO_USER"] = "test_auth2" provider: AuthDataProvider = SimpleAuthProvider() self.assertTrue(provider.has_token_data()) @@ -50,4 +53,4 @@ def test_auth_provider(self): token[len(AuthConstants.AUTHORIZATION_BASIC_HEADER) :] ).decode("utf-8") self.assertEqual(f"{user}:dummy", token_string) - os.environ["GRAVITINO_USER"] = "" + os.environ["GRAVITINO_USER"] = original_gravitino_user