mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed bug loading database called 'test-database (1).sqlite'
Closes #1181. Also now ensures that database URLs have special characters URL-quoted.
This commit is contained in:
parent
07e1635615
commit
a5ede3cdd4
7 changed files with 55 additions and 27 deletions
|
|
@ -30,7 +30,7 @@ def test_homepage(app_client_two_attached_databases):
|
|||
# Should be two attached databases
|
||||
assert [
|
||||
{"href": "/fixtures", "text": "fixtures"},
|
||||
{"href": "/extra database", "text": "extra database"},
|
||||
{"href": r"/extra%20database", "text": "extra database"},
|
||||
] == [{"href": a["href"], "text": a.text.strip()} for a in soup.select("h2 a")]
|
||||
# The first attached database should show count text and attached tables
|
||||
h2 = soup.select("h2")[1]
|
||||
|
|
@ -44,8 +44,8 @@ def test_homepage(app_client_two_attached_databases):
|
|||
{"href": a["href"], "text": a.text.strip()} for a in links_p.findAll("a")
|
||||
]
|
||||
assert [
|
||||
{"href": "/extra database/searchable", "text": "searchable"},
|
||||
{"href": "/extra database/searchable_view", "text": "searchable_view"},
|
||||
{"href": r"/extra%20database/searchable", "text": "searchable"},
|
||||
{"href": r"/extra%20database/searchable_view", "text": "searchable_view"},
|
||||
] == table_links
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue