Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Jul 2, 2024
1 parent 14b24fc commit 799cc1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
9 changes: 0 additions & 9 deletions python-sdk-functional-test/bugs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ def test_bug_with_17602976(self):
except (ValueError, TypeError, AttributeError) as e:
self.assertEqual("'list' object has no attribute 'get'", e.args[0])

def test_bug_with_nlp(self):
# accept-encoding
from aliyunsdknls_cloud_meta.request.v20180518.CreateTokenRequest import CreateTokenRequest
request = CreateTokenRequest()
request.set_endpoint('nls-meta.cn-shanghai.aliyuncs.com')
response = self.client.do_action_with_exception(request)
response = self.get_dict_response(response)
self.assertTrue(response.get("RequestId"))

def test_bug_with_body_params(self):
# body_params
request = CommonRequest()
Expand Down
21 changes: 1 addition & 20 deletions python-sdk-functional-test/new_endpoint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from base import SDKTestBase
from mock import MagicMock, patch
from mock import patch
from aliyunsdkcore.client import AcsClient
from aliyunsdkecs.request.v20140526.DescribeRegionsRequest import DescribeRegionsRequest
from aliyunsdkram.request.v20150501.ListAccessKeysRequest import ListAccessKeysRequest
Expand Down Expand Up @@ -432,22 +432,3 @@ def test_bssopenapi_resolve(self):
self.client.do_action_with_exception(request)
except ServerException as e:
self.assertNotEqual("SDK.EndpointResolvingError", e.get_error_code())

def test_faas_resolve(self):
resolver = DefaultEndpointResolver(self.client)
request = ResolveEndpointRequest("cn-hangzhou", "faas", None, None)
self.assertEqual("faas.cn-hangzhou.aliyuncs.com", resolver.resolve(request))
client = self.init_client(region_id="cn-hangzhou")

from aliyunsdkfaas.request.v20170824.DescribeLoadTaskStatusRequest \
import DescribeLoadTaskStatusRequest
request = DescribeLoadTaskStatusRequest()
request.set_FpgaUUID("blah")
request.set_InstanceId("blah")
request.set_RoleArn("blah")

try:
client.do_action_with_exception(request)
assert False
except ServerException as e:
self.assertNotEqual(error_code.SDK_ENDPOINT_RESOLVING_ERROR, e.get_error_code())

0 comments on commit 799cc1f

Please sign in to comment.