def callsearchfoodservice(self, txtreq='youpi'):
     request = SearchFoodRequest()
     request.setReq(txtreq)
     ss = SearchFoodServiceFactory(request)
     # blocking call
     response = ss.getResponse()
     if response[0] == ss.pbresptype:
         assert len(response[1].getFoods()) == 4
     else:
         assert 0
    def callsearchfoodservice(self, txtreq="unkown"):
        request = SearchFoodRequest()
        request.setReq(txtreq)
        ss = SearchFoodService(request)
        # blocking call
        response = ss.getResponse()

        if response[0] == ss.pbresptype:
            assert len(response[1].getFoods()) > 0
        else:
            assert False