本文整理汇总了Python中suds.sudsobject.Object.GetLocationsResult方法的典型用法代码示例。如果您正苦于以下问题:Python Object.GetLocationsResult方法的具体用法?Python Object.GetLocationsResult怎么用?Python Object.GetLocationsResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类suds.sudsobject.Object
的用法示例。
在下文中一共展示了Object.GetLocationsResult方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_nearest_locations
# 需要导入模块: from suds.sudsobject import Object [as 别名]
# 或者: from suds.sudsobject.Object import GetLocationsResult [as 别名]
def test_nearest_locations(self):
"""Test nearest PostNL Pickup locations based on postal code"""
# first create a mock for the soap result
mock_object = SudsObject()
mock_object.GetLocationsResult = SudsObject()
mock_object.GetLocationsResult.ResponseLocation = mock_result
# mock the function call and return a almost like soap object
self.locations.client.service.GetNearestLocations = mock.MagicMock()
# the first param is the http status code
self.locations.client.service.GetNearestLocations.return_value = (200, mock_object) # noqa
# do the call
result = self.locations.nearest_locations(postalcode="6821AD")
self.assertEqual(result, (200, mock_result))