old_contents: import pytest
  from grpc_mate.helloworld_pb2 import HelloRequest
  
  
  @pytest.fixture(scope='module')
  def grpc_add_to_server():
      from grpc_mate.helloworld_pb2_grpc import add_GreeterServicer_to_server
  
      return add_GreeterServicer_to_server
  
  
  @pytest.fixture(scope='module')
  def grpc_servicer():
      from service.greeter_servicer import GreeterServicer
  
      return GreeterServicer()
  
  
  @pytest.fixture(scope='module')
  def grpc_stub_cls(grpc_channel):
      from grpc_mate.helloworld_pb2_grpc import GreeterStub
  
      return GreeterStub
  
  
  def test_SayHello(grpc_stub):
      hello_request = HelloRequest(name='ivan')
      response = grpc_stub.SayHello(hello_request)
  
      assert response.message == f'hello {hello_request.name}'
  
  
new_contents: import grpc
  import pytest
  from grpc_mate.helloworld_pb2 import HelloRequest
  
  
  @pytest.fixture(scope='module')
  def grpc_add_to_server():
      from grpc_mate.helloworld_pb2_grpc import add_GreeterServicer_to_server
  
      return add_GreeterServicer_to_server
  
  
  @pytest.fixture(scope='module')
  def grpc_servicer():
      from service.greeter_servicer import GreeterServicer
  
      return GreeterServicer()
  
  
  @pytest.fixture(scope='module')
  def grpc_stub_cls(grpc_channel):
      from grpc_mate.helloworld_pb2_grpc import GreeterStub
  
      return GreeterStub
  
  
  def test_SayHello(grpc_stub):
      hello_request = HelloRequest(name='ivan')
      response = grpc_stub.SayHello(hello_request)
  
      assert response.message == f'hello {hello_request.name}'
  
  
  def integration_test_SayHello():
      from grpc_mate.helloworld_pb2_grpc import GreeterStub
      channel = grpc.insecure_channel('localhost:8080')
      stub = GreeterStub(channel)
      hello_request = HelloRequest(name='local')
      response = stub.SayHello(hello_request)
      assert response.message == f'hello {hello_request.name}'
  
subject: add integration test