Esempio n. 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))
Esempio n. 2
0
 def test_get_states_filename(self):
     """Should get the full path to the states data file"""
     directory = utils.get_states_filename('Brazil')
     expected = os.path.join(settings.CITIES_DATA_LOCATION, 'brazil',
                             'states.csv')
     self.assertEqual(directory, expected)
Esempio n. 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))
Esempio n. 4
0
 def test_get_states_filename(self):
     """Should get the full path to the states data file"""
     directory = utils.get_states_filename('Brazil')
     expected = os.path.join(settings.CITIES_DATA_LOCATION, 'brazil', 'states.csv')
     self.assertEqual(directory, expected)