MCPcopy
hub / github.com/mudler/LocalAI / test_server_startup

Method test_server_startup

backend/python/mlx/test.py:32–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 self.service.wait()
31
32 def test_server_startup(self):
33 try:
34 self.setUp()
35 with grpc.insecure_channel("localhost:50051") as channel:
36 stub = backend_pb2_grpc.BackendStub(channel)
37 response = stub.Health(backend_pb2.HealthMessage())
38 self.assertEqual(response.message, b'OK')
39 except Exception as err:
40 print(err)
41 self.fail("Server failed to start")
42 finally:
43 self.tearDown()
44 def test_load_model(self):
45 """
46 This method tests if the model is loaded successfully

Callers

nothing calls this directly

Calls 3

setUpMethod · 0.95
tearDownMethod · 0.95
HealthMethod · 0.45

Tested by

no test coverage detected