pingsutw commented on a change in pull request #179: SUBMARINE-377. [SDK] Submit a job by pysubamrine URL: https://github.com/apache/submarine/pull/179#discussion_r377033839
########## File path: submarine-sdk/pysubmarine/tests/client/test_client.py ########## @@ -0,0 +1,161 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from mock import patch +from unittest.mock import ANY +import pytest +from submarine.client import Client + +from submarine.exceptions import SubmarineException +from submarine.proto.SubmarineServerProtocol_pb2_grpc import SubmarineServerProtocolStub +from submarine.client.params import RoleParameter, Localization, Resource +import submarine.proto.SubmarineServerProtocol_pb2 + + +def __init__(self, channel): + def mocked_submit(params): + class mocked_response: + application_id = 'application-123456789' + + return mocked_response() + + self.SubmitJob = mocked_submit + + +# Submarine client parameters +host = 'submarine' +port = 8980 Review comment: @liuxunorg Thanks for the review. Yes, this is default submarine rpc server port ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org For additional commands, e-mail: dev-h...@submarine.apache.org