chore: update sql function usage
This commit is contained in:
parent
b2e081d076
commit
ae3f216255
1 changed files with 2 additions and 2 deletions
|
|
@ -75,7 +75,7 @@ class TestDB(IntegrationTestCase):
|
|||
frappe.db.sql("SELECT Max(name) FROM tabUser")[0][0],
|
||||
)
|
||||
self.assertEqual(
|
||||
frappe.db.get_value("User", {}, {"MIN": "name"}, order_by=None),
|
||||
frappe.db.get_value("User", {}, [{"MIN": "name"}], order_by=None),
|
||||
frappe.db.sql("SELECT Min(name) FROM tabUser")[0][0],
|
||||
)
|
||||
self.assertIn(
|
||||
|
|
@ -374,7 +374,7 @@ class TestDB(IntegrationTestCase):
|
|||
random_field,
|
||||
)
|
||||
self.assertEqual(
|
||||
next(iter(frappe.get_all("ToDo", fields=[{"count": random_field}], limit=1)[0])),
|
||||
next(iter(frappe.get_all("ToDo", fields=[{"COUNT": random_field}], limit=1)[0])),
|
||||
"count" if frappe.conf.db_type == "postgres" else f"count(`{random_field}`)",
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue