Example #1
0
 def handle(self, *args, **options):
     country = 'Brazil'
     utils.load_states_from_file(utils.get_states_filename(country))
     utils.load_cities_from_file(utils.get_cities_filename(country))
Example #2
0
 def test_get_cities_filename(self):
     """Should get the full path to the cities data file"""
     directory = utils.get_cities_filename('Brazil')
     expected = os.path.join(settings.CITIES_DATA_LOCATION, 'brazil',
                             'cities.csv')
     self.assertEqual(directory, expected)
Example #3
0
 def handle(self, *args, **options):
     country = "Brazil"
     utils.load_states_from_file(utils.get_states_filename(country))
     utils.load_cities_from_file(utils.get_cities_filename(country))
Example #4
0
 def test_get_cities_filename(self):
     """Should get the full path to the cities data file"""
     directory = utils.get_cities_filename('Brazil')
     expected = os.path.join(settings.CITIES_DATA_LOCATION, 'brazil', 'cities.csv')
     self.assertEqual(directory, expected)