mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for test failure caused by SQLite 3.37.0+, closes #1647
This commit is contained in:
parent
dd94157f89
commit
5010d1359b
2 changed files with 10 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
{% for column in display_columns %}
|
||||
<th {% if column.description %}data-column-description="{{ column.description }}" {% endif %}class="col-{{ column.name|to_css_class }}" scope="col" data-column="{{ column.name }}" data-column-type="{{ column.type }}" data-column-not-null="{{ column.notnull }}" data-is-pk="{% if column.is_pk %}1{% else %}0{% endif %}">
|
||||
<th {% if column.description %}data-column-description="{{ column.description }}" {% endif %}class="col-{{ column.name|to_css_class }}" scope="col" data-column="{{ column.name }}" data-column-type="{{ column.type.lower() }}" data-column-not-null="{{ column.notnull }}" data-is-pk="{% if column.is_pk %}1{% else %}0{% endif %}">
|
||||
{% if not column.sortable %}
|
||||
{{ column.name }}
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -279,7 +279,15 @@ async def test_table_columns(db, table, expected):
|
|||
@pytest.mark.asyncio
|
||||
async def test_table_column_details(db, table, expected):
|
||||
columns = await db.table_column_details(table)
|
||||
assert columns == expected
|
||||
# Convert "type" to lowercase before comparison
|
||||
# https://github.com/simonw/datasette/issues/1647
|
||||
compare_columns = [
|
||||
Column(
|
||||
c.cid, c.name, c.type.lower(), c.notnull, c.default_value, c.is_pk, c.hidden
|
||||
)
|
||||
for c in columns
|
||||
]
|
||||
assert compare_columns == expected
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue