Python twilio.rest 模块,TwilioLookupsClient() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用twilio.rest.TwilioLookupsClient()

项目:Texty    作者:sarthfrey    | 项目源码 | 文件源码
def test_phone_numbers(mock):
    client = TwilioLookupsClient("ACCOUNT_SID", "AUTH_TOKEN")
    resp = create_mock_json("tests/resources/lookups/phone_number_instance.json")
    mock.return_value = resp
    client.phone_numbers.get("+15108675309")
    uri = "https://lookups.twilio.com/v1/PhoneNumbers/+15108675309"
    mock.assert_called_with("GET", uri, params={}, auth=("ACCOUNT_SID", "AUTH_TOKEN"),
                            use_json_extension=False)
项目:Callandtext    作者:iaora    | 项目源码 | 文件源码
def test_phone_numbers(mock):
    client = TwilioLookupsClient("ACCOUNT_SID", "AUTH_TOKEN")
    resp = create_mock_json("tests/resources/lookups/phone_number_instance.json")
    mock.return_value = resp
    client.phone_numbers.get("+15108675309")
    uri = "https://lookups.twilio.com/v1/PhoneNumbers/+15108675309"
    mock.assert_called_with("GET", uri, params={}, auth=("ACCOUNT_SID", "AUTH_TOKEN"),
                            use_json_extension=False)
项目:alexa-ive-fallen-and-cant-get-up    作者:heatherbooker    | 项目源码 | 文件源码
def test_phone_numbers(mock):
    client = TwilioLookupsClient("ACCOUNT_SID", "AUTH_TOKEN")
    resp = create_mock_json("tests/resources/lookups/phone_number_instance.json")
    mock.return_value = resp
    client.phone_numbers.get("+15108675309")
    uri = "https://lookups.twilio.com/v1/PhoneNumbers/+15108675309"
    mock.assert_called_with("GET", uri, params={}, auth=("ACCOUNT_SID", "AUTH_TOKEN"),
                            use_json_extension=False)
项目:SenateCaller    作者:tcash21    | 项目源码 | 文件源码
def test_phone_numbers(mock):
    client = TwilioLookupsClient("ACCOUNT_SID", "AUTH_TOKEN")
    resp = create_mock_json("tests/resources/lookups/phone_number_instance.json")
    mock.return_value = resp
    client.phone_numbers.get("+15108675309")
    uri = "https://lookups.twilio.com/v1/PhoneNumbers/+15108675309"
    mock.assert_called_with("GET", uri, params={}, auth=("ACCOUNT_SID", "AUTH_TOKEN"),
                            use_json_extension=False)
项目:alexa-spark    作者:ismailakkila    | 项目源码 | 文件源码
def test_phone_numbers(mock):
    client = TwilioLookupsClient("ACCOUNT_SID", "AUTH_TOKEN")
    resp = create_mock_json("tests/resources/lookups/phone_number_instance.json")
    mock.return_value = resp
    client.phone_numbers.get("+15108675309")
    uri = "https://lookups.twilio.com/v1/PhoneNumbers/+15108675309"
    mock.assert_called_with("GET", uri, params={}, auth=("ACCOUNT_SID", "AUTH_TOKEN"),
                            use_json_extension=False)