Пример #1
0
 def test_city_details_population(self):
     testcitydetails = city_details('santiago','chile','10000')
     self.assertEqual(testcitydetails, 'Santiago, Chile - population 10000')
Пример #2
0
 def test_city_details(self):
     testcitydetails = city_details('santiago','chile')
     self.assertEqual(testcitydetails,'Santiago, Chile')
Пример #3
0
 def test_city_country_population(self):
     """Does function work when population is included?"""
     formatted_details = city_details('tacarigua', 'trinidad', 5)
     self.assertEqual(formatted_details,
                      'Tacarigua, Trinidad.\nPopulation: 5')
Пример #4
0
 def test_city_country(self):
     """Does ('tacarigua', 'trinidad') work?"""
     formatted_details = city_details('tacarigua', 'trinidad')
     self.assertEqual(formatted_details, 'Tacarigua, Trinidad.')
Пример #5
0
 def test_city_country(self):
     """Does function work when population is withheld??"""
     formatted_details = city_details('tacarigua', 'trinidad')
     self.assertEqual(formatted_details, 'Tacarigua, Trinidad.')