fix(tests): use correct quit command for sqlite console

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-03-17 16:24:05 +05:30
parent 5b98b4ca93
commit 5d566d03a0
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -960,7 +960,11 @@ class TestCommandUtils(IntegrationTestCase):
class TestDBCli(BaseTestCommands):
@timeout(10)
def test_db_cli(self):
self.execute("bench --site {site} db-console", kwargs={"cmd_input": rb"\q"})
if frappe.conf.db_type == "sqlite":
cmd_input = b".quit"
else:
cmd_input = rb"\q"
self.execute("bench --site {site} db-console", kwargs={"cmd_input": cmd_input})
self.assertEqual(self.returncode, 0)
@run_only_if(db_type_is.MARIADB)