def test_city_state_country(self): """Test city, state, country format.""" tested_location = location("Chicago", "United States of America", "Illinois") self.assertEqual(tested_location, "Chicago, Illinois, United States Of America")
def test_city_country(self): """Test whether a city, country format works.""" tested_location = location("montreal", "canada") self.assertEqual(tested_location, 'Montreal, Canada')
def test_city_country_population(self): place = location('santiago','chile',5000000) self.assertEqual(place,'Santiago, Chile - population 5000000')
def test_city_country(self): place = location('santiago','chile') self.assertEqual(place,'Santiago, Chile')
def test_city_country_populations(self): """Do city, country, and population data work""" locale = location('Chicago', 'USA', 2716000) self.assertEqual(locale, 'Chicago, USA - population 2716000')
def test_city_locations(self): """Do city and country names work?""" locale = location('Chicago', 'USA') self.assertEqual(locale, 'Chicago, USA')
def test_city_country(self): formatted_location = location('san francisco', 'california') self.assertEqual(formatted_location, 'San Francisco, California')
def test_city_country_population(self): formatted_location = location('fremont', 'california', 30000) self.assertEqual(formatted_location, 'Fremont, California - Population = 30000')
def test_city_country(self): """Does the output look like 'Santiago, Chile'.""" formatted_location = location('santiago', 'chile') self.assertEqual(formatted_location, 'Santiago, Chile')
def test_city_country(self): mylocation = location('Santiago', 'Chile') self.assertEqual(mylocation, 'Santiago,Chile')
def test_city_country_population(self): info = location('Santiago', 'Chile', 5000000) self.assertEqual(info, 'Santiago,Chile - 5000000')
def test_location(self): """Do locations like 'London, England' work?""" formatted_location = location('london', 'england') self.assertEqual(formatted_location, 'London, England')
def test_location_demographics(self): """Do locations with populations like 'London, England, population: 8.7 million' work?""" formatted_location = location('london', 'england', '8.7 million') self.assertEqual(formatted_location, 'London, England, population: 8.7 million')