mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
New hidden: True option for table metadat, closes #239
This commit is contained in:
parent
d3a0069c54
commit
02ee31c8b4
4 changed files with 31 additions and 10 deletions
|
|
@ -90,6 +90,7 @@ METADATA = {
|
|||
},
|
||||
'no_primary_key': {
|
||||
'sortable_columns': [],
|
||||
'hidden': True,
|
||||
},
|
||||
'units': {
|
||||
'units': {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def test_homepage(app_client):
|
|||
assert response.json.keys() == {'test_tables': 0}.keys()
|
||||
d = response.json['test_tables']
|
||||
assert d['name'] == 'test_tables'
|
||||
assert d['tables_count'] == 15
|
||||
assert d['tables_count'] == 14
|
||||
|
||||
|
||||
def test_database_page(app_client):
|
||||
|
|
@ -113,14 +113,6 @@ def test_database_page(app_client):
|
|||
},
|
||||
'label_column': None,
|
||||
'primary_keys': ['pk'],
|
||||
}, {
|
||||
'columns': ['content', 'a', 'b', 'c'],
|
||||
'name': 'no_primary_key',
|
||||
'count': 201,
|
||||
'hidden': False,
|
||||
'foreign_keys': {'incoming': [], 'outgoing': []},
|
||||
'label_column': None,
|
||||
'primary_keys': [],
|
||||
}, {
|
||||
'columns': ['id', 'content', 'content2'],
|
||||
'name': 'primary_key_multiple_columns',
|
||||
|
|
@ -213,6 +205,14 @@ def test_database_page(app_client):
|
|||
'foreign_keys': {'incoming': [], 'outgoing': []},
|
||||
'label_column': None,
|
||||
'primary_keys': ['pk'],
|
||||
}, {
|
||||
'columns': ['content', 'a', 'b', 'c'],
|
||||
'name': 'no_primary_key',
|
||||
'count': 201,
|
||||
'hidden': True,
|
||||
'foreign_keys': {'incoming': [], 'outgoing': []},
|
||||
'label_column': None,
|
||||
'primary_keys': [],
|
||||
}] == data['tables']
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue