#NEWLINE# @ patch ( 'twilio.rest.resources.base.make_twilio_request' ) #NEWLINE# def test_get_phone_numbers_instance( self , request ) : #NEWLINE# #INDENT# resp = create_mock_json ( 'tests/resources/trunking/phone_numbers_instance.json' ) #NEWLINE# resp . status_code = 200 #NEWLINE# request . return_value = resp #NEWLINE# phone_numbers = PhoneNumbers ( BASE_URI , AUTH ) #NEWLINE# result = phone_numbers . get ( 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ) #NEWLINE# assert_equal ( result . sid , 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ) #NEWLINE# assert_equal ( result . account_sid , 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ) #NEWLINE# assert_equal ( result . trunk_sid , 'TK11111111111111111111111111111111' ) #NEWLINE# assert_equal ( result . friendly_name , 'Name' ) #NEWLINE# assert_equal ( result . phone_number , '+14158675309' ) #NEWLINE# assert_equal ( result . api_version , '2010-04-01' ) #NEWLINE# assert_equal ( result . voice_caller_id_lookup , False ) #NEWLINE# assert_equal ( result . voice_fallback_method , 'POST' ) #NEWLINE# assert_equal ( result . status_callback_method , 'POST' ) #NEWLINE# assert_equal ( result . sms_url , 'https://demo.twilio.com/welcome/sms/reply/' ) #NEWLINE# assert_equal ( result . sms_method , 'POST' ) #NEWLINE# assert_equal ( result . sms_fallback_method , 'POST' ) #NEWLINE# assert_equal ( result . address_requirements , 'none' ) #NEWLINE# assert_equal ( result . beta , False ) #NEWLINE# assert_equal ( result . url , '{0}/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' . format ( BASE_URI ) ) #NEWLINE# assert_equal ( result . links [ 'phone_number' ] , '{0}/{1}' . format ( PHONE_NUMBERS_BASE_URI , 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ) ) #NEWLINE# request . assert_called_with ( 'GET' , '{0}/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' . format ( BASE_URI ) , auth = AUTH , use_json_extension = False )