<s> import unittest <EOL> from mock import patch <EOL> from nose . tools import assert_equal <EOL> from tests . tools import create_mock_json <EOL> from twilio . rest . resources . pricing . messaging_countries import ( <EOL> MessagingCountries <EOL> ) <EOL> AUTH = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> BASE_URI = "<STR_LIT>" <EOL> class MessagingCountriesTest ( unittest . TestCase ) : <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_messaging_countries ( self , request ) : <EOL> resp = create_mock_json ( <EOL> '<STR_LIT>' ) <EOL> resp . status_code = <NUM_LIT:200> <EOL> request . return_value = resp <EOL> countries = MessagingCountries ( BASE_URI + "<STR_LIT>" , AUTH ) <EOL> result = countries . list ( ) <EOL> assert_equal ( result [ <NUM_LIT:0> ] . iso_country , "<STR_LIT>" ) <EOL> assert_equal ( len ( result ) , <NUM_LIT:2> ) <EOL> request . assert_called_with ( <EOL> "<STR_LIT:GET>" , <EOL> "<STR_LIT>" . format ( BASE_URI ) , <EOL> auth = AUTH , <EOL> use_json_extension = False , <EOL> params = { } <EOL> ) <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_messaging_country ( self , request ) : <EOL> resp = create_mock_json ( <EOL> '<STR_LIT>' ) <EOL> resp . status_code = <NUM_LIT:200> <EOL> request . return_value = resp <EOL> countries = MessagingCountries ( BASE_URI + "<STR_LIT>" , AUTH ) <EOL> result = countries . get ( '<STR_LIT>' ) <EOL> assert_equal ( result . iso_country , "<STR_LIT>" ) <EOL> assert_equal ( result . price_unit , "<STR_LIT>" ) <EOL> assert_equal ( result . outbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( result . outbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( result . outbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> prices = result . outbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] <EOL> assert_equal ( prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:3> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:3> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( prices [ <NUM_LIT:3> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> inbound_sms_prices = result . inbound_sms_prices <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:1> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> assert_equal ( inbound_sms_prices [ <NUM_LIT:2> ] [ '<STR_LIT>' ] , "<STR_LIT>" ) <EOL> request . assert_called_with ( <EOL> "<STR_LIT:GET>" , <EOL> "<STR_LIT>" . format ( BASE_URI ) , <EOL> auth = AUTH , <EOL> use_json_extension = False , <EOL> ) </s>
