@@ -33,7 +33,7 @@ def test_version_command() -> None:
3333
3434
3535def test_info_command_success (mock_query_infrahub_version , mock_query_infrahub_user ) -> None :
36- result = runner .invoke (app , ["info" ])
36+ result = runner .invoke (app , ["info" ], env = { "INFRAHUB_API_TOKEN" : "foo" } )
3737 assert result .exit_code == 0
3838 for expected in ["Connection Status" , "Python Version" , "SDK Version" , "Infrahub Version" ]:
3939 assert expected in result .stdout , f"'{ expected } ' not found in info command output"
@@ -46,15 +46,16 @@ def test_info_command_failure() -> None:
4646
4747
4848def test_info_detail_command_success (mock_query_infrahub_version , mock_query_infrahub_user ) -> None :
49+ result = runner .invoke (app , ["info" , "--detail" ], env = {"INFRAHUB_API_TOKEN" : "foo" })
50+ assert result .exit_code == 0
51+ for expected in ["Connection Status" , "Version Information" , "Client Info" , "Infrahub Info" , "Groups:" ]:
52+ assert expected in result .stdout , f"'{ expected } ' not found in detailed info command output"
53+
54+
55+ def test_anonymous_info_detail_command_success (mock_query_infrahub_version ) -> None :
4956 result = runner .invoke (app , ["info" , "--detail" ])
5057 assert result .exit_code == 0
51- for expected in [
52- "Connection Status" ,
53- "Version Information" ,
54- "Client Info" ,
55- "Infrahub Info" ,
56- "Groups:" ,
57- ]:
58+ for expected in ["Connection Status" , "Version Information" , "Client Info" , "Infrahub Info" , "anonymous" ]:
5859 assert expected in result .stdout , f"'{ expected } ' not found in detailed info command output"
5960
6061
0 commit comments