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))
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)
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))