Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_geographies_county(self):
self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs5', 2015),
{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
'Kalawao County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '005')]),
'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs1', 2015),
{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
def test_geographies_state(self):
for year in range(2009, 2018+1):
self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '*')]), 'acs5', year),
{
'Alaska': censusdata.censusgeo([('state', '02')]),
'Alabama': censusdata.censusgeo([('state', '01')]),
'Arkansas': censusdata.censusgeo([('state', '05')]),
'Arizona': censusdata.censusgeo([('state', '04')]),
'California': censusdata.censusgeo([('state', '06')]),
'Colorado': censusdata.censusgeo([('state', '08')]),
'Connecticut': censusdata.censusgeo([('state', '09')]),
'District of Columbia': censusdata.censusgeo([('state', '11')]),
'Delaware': censusdata.censusgeo([('state', '10')]),
'Florida': censusdata.censusgeo([('state', '12')]),
'Georgia': censusdata.censusgeo([('state', '13')]),
'Hawaii': censusdata.censusgeo([('state', '15')]),
'Iowa': censusdata.censusgeo([('state', '19')]),
'Idaho': censusdata.censusgeo([('state', '16')]),
'Illinois': censusdata.censusgeo([('state', '17')]),
def test_geographies_county(self):
self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs5', 2015),
{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
'Kalawao County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '005')]),
'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})
self.assertEqual(censusdata.geographies(censusdata.censusgeo([('state', '15'), ('county', '*')]), 'acs1', 2015),
{'Hawaii County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '001')]),
'Honolulu County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '003')]),
'Kauai County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '007')]),
'Maui County, Hawaii': censusdata.censusgeo([('state', '15'), ('county', '009')]),})