kopia lustrzana https://github.com/simonw/datasette
_memory database should not be mutable, closes #1917
rodzic
9f5321ff1e
commit
6b47734c04
|
@ -278,7 +278,9 @@ class Datasette:
|
|||
self.crossdb = crossdb
|
||||
self.nolock = nolock
|
||||
if memory or crossdb or not self.files:
|
||||
self.add_database(Database(self, is_memory=True), name="_memory")
|
||||
self.add_database(
|
||||
Database(self, is_mutable=False, is_memory=True), name="_memory"
|
||||
)
|
||||
# memory_name is a random string so that each Datasette instance gets its own
|
||||
# unique in-memory named database - otherwise unit tests can fail with weird
|
||||
# errors when different instances accidentally share an in-memory database
|
||||
|
|
|
@ -59,7 +59,7 @@ async def test_datasette_constructor():
|
|||
"route": "_memory",
|
||||
"path": None,
|
||||
"size": 0,
|
||||
"is_mutable": True,
|
||||
"is_mutable": False,
|
||||
"is_memory": True,
|
||||
"hash": None,
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue