mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Correctly display facets with value of 0 - fixes #318
Also added comprehensive unit test for facet display HTML.
This commit is contained in:
parent
fdfbbbb9ee
commit
aeeb50f61b
5 changed files with 122 additions and 34 deletions
|
|
@ -12,22 +12,22 @@ world
|
|||
'''.replace('\n', '\r\n')
|
||||
|
||||
EXPECTED_TABLE_WITH_LABELS_CSV = '''
|
||||
pk,planet_int,state,city_id,city_id_label,neighborhood
|
||||
1,1,CA,1,San Francisco,Mission
|
||||
2,1,CA,1,San Francisco,Dogpatch
|
||||
3,1,CA,1,San Francisco,SOMA
|
||||
4,1,CA,1,San Francisco,Tenderloin
|
||||
5,1,CA,1,San Francisco,Bernal Heights
|
||||
6,1,CA,1,San Francisco,Hayes Valley
|
||||
7,1,CA,2,Los Angeles,Hollywood
|
||||
8,1,CA,2,Los Angeles,Downtown
|
||||
9,1,CA,2,Los Angeles,Los Feliz
|
||||
10,1,CA,2,Los Angeles,Koreatown
|
||||
11,1,MI,3,Detroit,Downtown
|
||||
12,1,MI,3,Detroit,Greektown
|
||||
13,1,MI,3,Detroit,Corktown
|
||||
14,1,MI,3,Detroit,Mexicantown
|
||||
15,2,MC,4,Memnonia,Arcadia Planitia
|
||||
pk,planet_int,on_earth,state,city_id,city_id_label,neighborhood
|
||||
1,1,1,CA,1,San Francisco,Mission
|
||||
2,1,1,CA,1,San Francisco,Dogpatch
|
||||
3,1,1,CA,1,San Francisco,SOMA
|
||||
4,1,1,CA,1,San Francisco,Tenderloin
|
||||
5,1,1,CA,1,San Francisco,Bernal Heights
|
||||
6,1,1,CA,1,San Francisco,Hayes Valley
|
||||
7,1,1,CA,2,Los Angeles,Hollywood
|
||||
8,1,1,CA,2,Los Angeles,Downtown
|
||||
9,1,1,CA,2,Los Angeles,Los Feliz
|
||||
10,1,1,CA,2,Los Angeles,Koreatown
|
||||
11,1,1,MI,3,Detroit,Downtown
|
||||
12,1,1,MI,3,Detroit,Greektown
|
||||
13,1,1,MI,3,Detroit,Corktown
|
||||
14,1,1,MI,3,Detroit,Mexicantown
|
||||
15,2,0,MC,4,Memnonia,Arcadia Planitia
|
||||
'''.lstrip().replace('\n', '\r\n')
|
||||
|
||||
def test_table_csv(app_client):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue