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')
示例#3
0
	def test_city_country_population(self):
		place = location('santiago','chile',5000000)
		self.assertEqual(place,'Santiago, Chile - population 5000000')
示例#4
0
	def test_city_country(self):
		place = location('santiago','chile')
		self.assertEqual(place,'Santiago, Chile')
示例#5
0
 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')
示例#6
0
 def test_city_locations(self):
     """Do city and country names work?"""
     locale = location('Chicago', 'USA')
     self.assertEqual(locale, 'Chicago, USA')
示例#7
0
 def test_city_country(self):
     formatted_location = location('san francisco', 'california')
     self.assertEqual(formatted_location, 'San Francisco, California')
示例#8
0
 def test_city_country_population(self):
     formatted_location = location('fremont', 'california', 30000)
     self.assertEqual(formatted_location,
                      'Fremont, California - Population = 30000')
示例#9
0
 def test_city_country(self):
     """Does the output look like 'Santiago, Chile'."""
     formatted_location = location('santiago', 'chile')
     self.assertEqual(formatted_location, 'Santiago, Chile')
示例#10
0
 def test_city_country(self):
     mylocation = location('Santiago', 'Chile')
     self.assertEqual(mylocation, 'Santiago,Chile')
示例#11
0
 def test_city_country_population(self):
     info = location('Santiago', 'Chile', 5000000)
     self.assertEqual(info, 'Santiago,Chile - 5000000')
示例#12
0
 def test_location(self):
     """Do locations like 'London, England' work?"""
     formatted_location = location('london', 'england')
     self.assertEqual(formatted_location, 'London, England')
示例#13
0
 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')