コード例 #1
0
def getMessages():
    print("RECIBIENDO")
    for x in stub.recibirMensajes(structure.Usuario(username=sender)):
        print(x)
コード例 #2
0
 def test_recibirMensajes(self):
     with grpc.insecure_channel("localhost:" + self.port) as channel:
         stub = str_grpc.ChatStub(channel)
         response = stub.recibirMensajes(
             structure.Usuario(username="******"))
         self.assertEqual(response)