(self)
| 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 |