def test_new_style_endpoints(self): client = Census(KEY, year=2016) res_2016_2016 = client.acs1.state('B01001_004E', Census.ALL) res_2016_2014 = client.acs1.state('B01001_004E', Census.ALL, year=2014) client = Census(KEY, year=2014) res_2014_2014 = client.acs1.state('B01001_004E', Census.ALL) res_2014_2016 = client.acs1.state('B01001_004E', Census.ALL, year=2016) assert res_2016_2016 == res_2014_2016 assert res_2014_2014 == res_2016_2014
def test_older_sf1(self): client = Census(KEY) result_2010 = client.sf1.get( ( 'P008001', # total 'P008003', # white 'P008004', # black 'P008006', # asian 'P008010', # latino ), geo={ 'for': 'place:53476', 'in': 'state:06' }, ) result_2000 = client.sf1.get( ( 'P008001', # total 'P008003', # white 'P008004', # black 'P008006', # asian 'P008010', # latino ), geo={ 'for': 'place:53476', 'in': 'state:06' }, year=2000, ) assert result_2010 != result_2000
def setUp(self): self._client = Census(KEY, year=2008)
def setUp(self): self._client = Census(KEY)