mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix for Python 3.5
3.5 doesn't let you json.loads() on a bytes object
This commit is contained in:
parent
1186ca1eac
commit
767e29c404
1 changed files with 3 additions and 5 deletions
|
|
@ -1664,9 +1664,7 @@ def test_common_prefix_database_names(app_client_conflicting_database_names):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
for db_name, path in (("foo", "/foo.json"), ("foo-bar", "/foo-bar.json")):
|
for db_name, path in (("foo", "/foo.json"), ("foo-bar", "/foo-bar.json")):
|
||||||
assert (
|
data = json.loads(
|
||||||
db_name
|
app_client_conflicting_database_names.get(path).body.decode("utf8")
|
||||||
== json.loads(app_client_conflicting_database_names.get(path).body)[
|
|
||||||
"database"
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
assert db_name == data["database"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue