File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 3333
3434def from_env (var_name : str , default : Any = None ) -> Callable :
3535 def inner () -> Any :
36- os .environ .get (var_name , default )
36+ return os .environ .get (var_name , default )
3737
3838 return inner
3939
Original file line number Diff line number Diff line change @@ -48,11 +48,16 @@ def test_settings_auth_credentials(kwargs) -> None:
4848def test_no_deprecation_warning_with_env (logger_mock : Mock ):
4949 with patch .dict (
5050 os .environ ,
51- {"FIREBOLT_USER" : "user" , "FIREBOLT_PASSWORD" : "password" },
51+ {
52+ "FIREBOLT_USER" : "user" ,
53+ "FIREBOLT_PASSWORD" : "password" ,
54+ "FIREBOLT_SERVER" : "dummy.firebolt.io" ,
55+ },
5256 clear = True ,
5357 ):
54- s = Settings (server = "server" , default_region = "region" )
58+ s = Settings (default_region = "region" )
5559 logger_mock .warning .assert_not_called ()
60+ assert s .server == "dummy.firebolt.io"
5661 assert s .auth is not None , "Settings.auth wasn't populated from env variables"
5762 assert s .auth .username == "user" , "Invalid username in Settings.auth"
5863 assert s .auth .password == "password" , "Invalid password in Settings.auth"
You can’t perform that action at this time.
0 commit comments