<s> from geopy . compat import u <EOL> from geopy . point import Point <EOL> from geopy . geocoders import Photon <EOL> from test . geocoders . util import GeocoderTestBase <EOL> class PhotonTestCase ( GeocoderTestBase ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . geocoder = Photon ( ) <EOL> cls . known_country_it = "<STR_LIT>" <EOL> cls . known_country_fr = "<STR_LIT>" <EOL> def test_geocode ( self ) : <EOL> """<STR_LIT>""" <EOL> self . geocode_run ( <EOL> { "<STR_LIT>" : "<STR_LIT>" } , <EOL> { "<STR_LIT>" : <NUM_LIT> , "<STR_LIT>" : <NUM_LIT> } , <EOL> ) <EOL> def test_unicode_name ( self ) : <EOL> """<STR_LIT>""" <EOL> self . geocode_run ( <EOL> { "<STR_LIT>" : u ( "<STR_LIT>" ) } , <EOL> { "<STR_LIT>" : <NUM_LIT> , "<STR_LIT>" : <NUM_LIT> } , <EOL> ) <EOL> def test_reverse_string ( self ) : <EOL> """<STR_LIT>""" <EOL> self . reverse_run ( <EOL> { "<STR_LIT>" : "<STR_LIT>" } , <EOL> { "<STR_LIT>" : <NUM_LIT> , "<STR_LIT>" : <NUM_LIT> } <EOL> ) <EOL> def test_reverse_point ( self ) : <EOL> """<STR_LIT>""" <EOL> self . reverse_run ( <EOL> { "<STR_LIT>" : Point ( <NUM_LIT> , <NUM_LIT> ) } , <EOL> { "<STR_LIT>" : <NUM_LIT> , "<STR_LIT>" : <NUM_LIT> } <EOL> ) <EOL> def test_geocode_language_parameter ( self ) : <EOL> """<STR_LIT>""" <EOL> result_geocode = self . _make_request ( <EOL> self . geocoder . geocode , <EOL> self . known_country_fr , <EOL> language = "<STR_LIT>" , <EOL> ) <EOL> self . assertEqual ( <EOL> result_geocode . raw [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <EOL> self . known_country_it <EOL> ) <EOL> def test_reverse_language_parameter ( self ) : <EOL> """<STR_LIT>""" <EOL> result_reverse_it = self . _make_request ( <EOL> self . geocoder . reverse , <EOL> "<STR_LIT>" , <EOL> exactly_one = True , <EOL> language = "<STR_LIT>" , <EOL> ) <EOL> self . assertEqual ( <EOL> result_reverse_it . raw [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <EOL> self . known_country_it <EOL> ) <EOL> result_reverse_fr = self . _make_request ( <EOL> self . geocoder . reverse , <EOL> "<STR_LIT>" , <EOL> exactly_one = True , <EOL> language = "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( <EOL> result_reverse_fr . raw [ '<STR_LIT>' ] [ '<STR_LIT>' ] , <EOL> self . known_country_fr <EOL> ) </s>
