From 5d566d03a04b1d908420e1937b9e0c8cc5a43656 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Mon, 17 Mar 2025 16:24:05 +0530 Subject: [PATCH] fix(tests): use correct quit command for sqlite console Signed-off-by: Akhil Narang --- frappe/commands/test_commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frappe/commands/test_commands.py b/frappe/commands/test_commands.py index b1fbd65d2d..6d6365a5e3 100644 --- a/frappe/commands/test_commands.py +++ b/frappe/commands/test_commands.py @@ -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)