fix minor bug in _obs_getgeometryscores with FIRST, add tests

This commit is contained in:
John Krauss
2016-11-07 21:26:44 +00:00
parent 9fdca9161c
commit 8dad88a6b3
6 changed files with 681 additions and 237 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ def get_tablename_query(column_id, boundary_id, timespan):
METADATA_TABLES = ['obs_table', 'obs_column_table', 'obs_column', 'obs_column_tag',
'obs_tag', 'obs_column_to_column', 'obs_dump_version', 'obs_meta',
'obs_meta_numer', 'obs_meta_denom', 'obs_meta_geom',
'obs_meta_timespan', ]
'obs_meta_timespan', 'obs_column_table_tile', ]
FIXTURES = [
('us.census.acs.B01003001_quantile', 'us.census.tiger.census_tract', '2010 - 2014'),
@@ -290,7 +290,7 @@ def main():
"column_id IN ('{}', '{}')".format(numer_id, geom_id)
for numer_id, geom_id, timespan in FIXTURES
])
elif tablename == 'obs_column_table':
elif tablename in ('obs_column_table', 'obs_column_table_tile', ):
where = 'WHERE column_id IN ({numer_ids}) ' \
'OR column_id IN ({geom_ids}) ' \
'OR table_id IN ({table_ids}) '.format(