@@ -37,7 +37,7 @@ def test_constants(self):
3737 def test_get_observability_authentication_scope_returns_prod_scope (self ):
3838 """Test that get_observability_authentication_scope returns production scope."""
3939 result = get_observability_authentication_scope ()
40-
40+
4141 self .assertIsInstance (result , list )
4242 self .assertEqual (len (result ), 1 )
4343 self .assertEqual (result [0 ], PROD_OBSERVABILITY_SCOPE )
@@ -47,23 +47,23 @@ def test_is_development_environment_with_no_env_var(self):
4747 # Ensure environment variables are not set
4848 if "PYTHON_ENVIRONMENT" in os .environ :
4949 del os .environ ["PYTHON_ENVIRONMENT" ]
50-
50+
5151 result = is_development_environment ()
52-
52+
5353 self .assertFalse (result )
5454
5555 def test_is_development_environment_with_development_env_var (self ):
5656 """Test is_development_environment returns True when PYTHON_ENVIRONMENT is 'Development'."""
5757 os .environ ["PYTHON_ENVIRONMENT" ] = "Development"
58-
58+
5959 result = is_development_environment ()
60-
60+
6161 self .assertTrue (result )
6262
6363 def test_is_development_environment_case_insensitive (self ):
6464 """Test is_development_environment is case-insensitive."""
6565 test_cases = ["development" , "DEVELOPMENT" , "DeveLoPMenT" , "Development" ]
66-
66+
6767 for env_value in test_cases :
6868 with self .subTest (env_value = env_value ):
6969 os .environ ["PYTHON_ENVIRONMENT" ] = env_value
@@ -73,15 +73,15 @@ def test_is_development_environment_case_insensitive(self):
7373 def test_is_development_environment_with_production_env_var (self ):
7474 """Test is_development_environment returns False when PYTHON_ENVIRONMENT is 'production'."""
7575 os .environ ["PYTHON_ENVIRONMENT" ] = "production"
76-
76+
7777 result = is_development_environment ()
78-
78+
7979 self .assertFalse (result )
8080
8181 def test_is_development_environment_with_other_env_var (self ):
8282 """Test is_development_environment returns False for other environment values."""
8383 test_cases = ["staging" , "test" , "preprod" , "custom" ]
84-
84+
8585 for env_value in test_cases :
8686 with self .subTest (env_value = env_value ):
8787 os .environ ["PYTHON_ENVIRONMENT" ] = env_value
@@ -91,35 +91,35 @@ def test_is_development_environment_with_other_env_var(self):
9191 def test_is_development_environment_with_empty_env_var (self ):
9292 """Test is_development_environment returns False when PYTHON_ENVIRONMENT is empty."""
9393 os .environ ["PYTHON_ENVIRONMENT" ] = ""
94-
94+
9595 result = is_development_environment ()
96-
96+
9797 self .assertFalse (result )
9898
9999 def test_is_development_environment_with_whitespace_env_var (self ):
100100 """Test is_development_environment returns False when PYTHON_ENVIRONMENT is whitespace."""
101101 os .environ ["PYTHON_ENVIRONMENT" ] = " "
102-
102+
103103 result = is_development_environment ()
104-
104+
105105 self .assertFalse (result )
106106
107107 @patch .dict (os .environ , {"PYTHON_ENVIRONMENT" : "Development" }, clear = False )
108108 def test_python_environment_precedence (self ):
109109 """Test that PYTHON_ENVIRONMENT takes precedence."""
110110 result = is_development_environment ()
111-
111+
112112 self .assertTrue (result )
113113
114114 def test_default_environment_is_production (self ):
115115 """Test that the default environment is production when no env vars are set."""
116116 # Ensure no environment variables are set
117117 if "PYTHON_ENVIRONMENT" in os .environ :
118118 del os .environ ["PYTHON_ENVIRONMENT" ]
119-
119+
120120 # The _get_current_environment function should default to PRODUCTION_ENVIRONMENT_NAME
121121 result = is_development_environment ()
122-
122+
123123 self .assertFalse (result )
124124
125125
@@ -129,33 +129,33 @@ class TestObservabilityAuthenticationScope(unittest.TestCase):
129129 def test_scope_is_list (self ):
130130 """Test that the scope is returned as a list."""
131131 result = get_observability_authentication_scope ()
132-
132+
133133 self .assertIsInstance (result , list )
134134
135135 def test_scope_contains_single_value (self ):
136136 """Test that the scope list contains exactly one value."""
137137 result = get_observability_authentication_scope ()
138-
138+
139139 self .assertEqual (len (result ), 1 )
140140
141141 def test_scope_value_is_string (self ):
142142 """Test that the scope value is a string."""
143143 result = get_observability_authentication_scope ()
144-
144+
145145 self .assertIsInstance (result [0 ], str )
146146
147147 def test_scope_value_format (self ):
148148 """Test that the scope value has the correct format."""
149149 result = get_observability_authentication_scope ()
150-
150+
151151 self .assertTrue (result [0 ].startswith ("https://" ))
152152 self .assertTrue (result [0 ].endswith (".default" ))
153153
154154 def test_scope_consistency (self ):
155155 """Test that multiple calls return the same scope."""
156156 result1 = get_observability_authentication_scope ()
157157 result2 = get_observability_authentication_scope ()
158-
158+
159159 self .assertEqual (result1 , result2 )
160160
161161
0 commit comments