@@ -76,54 +76,54 @@ def setup(self, monkeypatch):
7676
7777 def test_invalid_profile_name (self ):
7878 with pytest .raises (ValueError ):
79- SqliteAccountInfo .get_user_account_info_path (profile = '&@(*$' )
79+ SqliteAccountInfo ._get_user_account_info_path (profile = '&@(*$' )
8080
8181 def test_profile_and_file_name_conflict (self ):
8282 with pytest .raises (ValueError ):
83- SqliteAccountInfo .get_user_account_info_path (file_name = 'foo' , profile = 'bar' )
83+ SqliteAccountInfo ._get_user_account_info_path (file_name = 'foo' , profile = 'bar' )
8484
8585 def test_profile_and_env_var_conflict (self , monkeypatch ):
8686 monkeypatch .setenv (B2_ACCOUNT_INFO_ENV_VAR , 'foo' )
8787 with pytest .raises (ValueError ):
88- SqliteAccountInfo .get_user_account_info_path (profile = 'bar' )
88+ SqliteAccountInfo ._get_user_account_info_path (profile = 'bar' )
8989
9090 def test_profile_and_xdg_config_env_var (self , monkeypatch ):
9191 monkeypatch .setenv (XDG_CONFIG_HOME_ENV_VAR , os .path .join ('~' , 'custom' ))
92- account_info_path = SqliteAccountInfo .get_user_account_info_path (profile = 'secondary' )
92+ account_info_path = SqliteAccountInfo ._get_user_account_info_path (profile = 'secondary' )
9393 assert account_info_path == os .path .expanduser (
9494 os .path .join ('~' , 'custom' , 'b2' , 'db-secondary.sqlite' )
9595 )
9696
9797 def test_profile (self ):
98- account_info_path = SqliteAccountInfo .get_user_account_info_path (profile = 'foo' )
98+ account_info_path = SqliteAccountInfo ._get_user_account_info_path (profile = 'foo' )
9999 assert account_info_path == os .path .expanduser (os .path .join ('~' , '.b2db-foo.sqlite' ))
100100
101101 def test_file_name (self ):
102- account_info_path = SqliteAccountInfo .get_user_account_info_path (
102+ account_info_path = SqliteAccountInfo ._get_user_account_info_path (
103103 file_name = os .path .join ('~' , 'foo' )
104104 )
105105 assert account_info_path == os .path .expanduser (os .path .join ('~' , 'foo' ))
106106
107107 def test_env_var (self , monkeypatch ):
108108 monkeypatch .setenv (B2_ACCOUNT_INFO_ENV_VAR , os .path .join ('~' , 'foo' ))
109- account_info_path = SqliteAccountInfo .get_user_account_info_path ()
109+ account_info_path = SqliteAccountInfo ._get_user_account_info_path ()
110110 assert account_info_path == os .path .expanduser (os .path .join ('~' , 'foo' ))
111111
112112 def test_default_file_if_exists (self , monkeypatch ):
113113 # ensure that XDG_CONFIG_HOME_ENV_VAR doesn't matter if default file exists
114114 monkeypatch .setenv (XDG_CONFIG_HOME_ENV_VAR , 'some' )
115115 with open (os .path .expanduser (B2_ACCOUNT_INFO_DEFAULT_FILE ), 'w' ) as account_file :
116116 account_file .write ('' )
117- account_info_path = SqliteAccountInfo .get_user_account_info_path ()
117+ account_info_path = SqliteAccountInfo ._get_user_account_info_path ()
118118 assert account_info_path == os .path .expanduser (B2_ACCOUNT_INFO_DEFAULT_FILE )
119119
120120 def test_xdg_config_env_var (self , monkeypatch ):
121121 monkeypatch .setenv (XDG_CONFIG_HOME_ENV_VAR , os .path .join ('~' , 'custom' ))
122- account_info_path = SqliteAccountInfo .get_user_account_info_path ()
122+ account_info_path = SqliteAccountInfo ._get_user_account_info_path ()
123123 assert account_info_path == os .path .expanduser (
124124 os .path .join ('~' , 'custom' , 'b2' , 'account_info' )
125125 )
126126
127127 def test_default_file (self ):
128- account_info_path = SqliteAccountInfo .get_user_account_info_path ()
128+ account_info_path = SqliteAccountInfo ._get_user_account_info_path ()
129129 assert account_info_path == os .path .expanduser (B2_ACCOUNT_INFO_DEFAULT_FILE )
0 commit comments