File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ from app .endpoints .info import info_endpoint_handler
2+ from configuration import AppConfig
3+
4+
5+ def test_info_endpoint (mocker ):
6+ """Test the info endpoint handler."""
7+ config_dict = {
8+ "name" : "foo" ,
9+ "service" : {
10+ "host" : "localhost" ,
11+ "port" : 8080 ,
12+ "auth_enabled" : False ,
13+ "workers" : 1 ,
14+ "color_log" : True ,
15+ "access_log" : True ,
16+ },
17+ "llama_stack" : {
18+ "api_key" : "xyzzy" ,
19+ "url" : "http://x.y.com:1234" ,
20+ "use_as_library_client" : False ,
21+ },
22+ "user_data_collection" : {
23+ "feedback_disabled" : True ,
24+ },
25+ }
26+ cfg = AppConfig ()
27+ cfg .init_from_dict (config_dict )
28+ request = None
29+ response = info_endpoint_handler (request )
30+ assert response is not None
31+ assert response .name is not None
32+ assert response .version is not None
You can’t perform that action at this time.
0 commit comments