def test_request_sms_code(): leancloud.init(os.environ['APP_ID'], master_key=os.environ['MASTER_KEY']) try: cloudfunc.request_sms_code('13111111111') except LeanCloudError as e: # 短信发送过于频繁或者欠费 if e.code in (601, 160): pass else: raise e
def test_request_sms_code(): leancloud.init(os.environ['APP_ID'], master_key=os.environ['MASTER_KEY']) try: cloudfunc.request_sms_code('13111111111') except LeanCloudError as e: # 短信发送过于频繁或者欠费或者关闭短信功能 if e.code in (601, 160, 119): pass else: raise e
def test_request_sms_code(): # type: () -> None if leancloud.client.REGION == 'US': return try: cloudfunc.request_sms_code('13111111111') except LeanCloudError as e: # 短信发送过于频繁或者欠费或者关闭短信功能 if e.code in (601, 160, 119): pass else: raise e
def test_request_sms_code(): leancloud.init(os.environ['appid'], master_key=os.environ['masterKey']) cloudfunc.request_sms_code('13111111111')