Add transactional plugin runtime and PostgreSQL-first schema synchronization
This commit is contained in:
@@ -17,6 +17,7 @@ class ContentAPI(TestCase):
|
||||
self.addCleanup(directory.cleanup)
|
||||
self.database = Path(directory.name) / "content.sqlite3"
|
||||
self.app = create_app(self.database, "writer")
|
||||
self.addCleanup(lambda: self.app.close())
|
||||
|
||||
def call(self, method, path, payload=None, token=None):
|
||||
path, _, query = path.partition("?")
|
||||
@@ -45,6 +46,7 @@ class ContentAPI(TestCase):
|
||||
self.assertEqual(status, 200)
|
||||
self.assertTrue(published["published_at"])
|
||||
self.assertEqual(published["fields"], fields)
|
||||
self.app.close()
|
||||
self.app = create_app(self.database, "writer")
|
||||
self.assertEqual(self.call("GET", path), (200, published))
|
||||
self.assertEqual(self.call("POST", path + "/publish", token="writer"), (200, published))
|
||||
|
||||
Reference in New Issue
Block a user