<s> import unittest <EOL> from nose . tools import assert_equal <EOL> from mock import patch <EOL> from tests . tools import create_mock_json <EOL> from twilio . rest . resources . pricing . phone_numbers import PhoneNumberCountries <EOL> AUTH = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> BASE_URI = "<STR_LIT>" <EOL> class NumbersTest ( unittest . TestCase ) : <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_number_countries ( self , request ) : <EOL> resp = create_mock_json ( '<STR_LIT>' ) <EOL> resp . status_code = <NUM_LIT:200> <EOL> request . return_value = resp <EOL> countries = PhoneNumberCountries ( 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:3> ) <EOL> request . assert_called_with ( <EOL> "<STR_LIT:GET>" , <EOL> "<STR_LIT>" . format ( BASE_URI ) , <EOL> auth = AUTH , <EOL> use_json_extension = False , <EOL> ) <EOL> @ patch ( '<STR_LIT>' ) <EOL> def test_number_country ( self , request ) : <EOL> resp = create_mock_json ( '<STR_LIT>' ) <EOL> resp . status_code = <NUM_LIT:200> <EOL> request . return_value = resp <EOL> countries = PhoneNumberCountries ( BASE_URI + "<STR_LIT>" , AUTH ) <EOL> country = countries . get ( '<STR_LIT>' ) <EOL> assert_equal ( country . country , "<STR_LIT>" ) <EOL> assert_equal ( <EOL> country . phone_number_prices , <EOL> [ <EOL> { <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> } , <EOL> { <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> } <EOL> ] , <EOL> ) <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>
