From cd17ca274ca3684fa53450415ff2d2292dbcdb61 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 31 Aug 2021 10:44:11 +0530 Subject: [PATCH] fix: Check column length from information schema --- .../custom/doctype/customize_form/test_customize_form.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frappe/custom/doctype/customize_form/test_customize_form.py b/frappe/custom/doctype/customize_form/test_customize_form.py index 6783e52d68..266ece8a1e 100644 --- a/frappe/custom/doctype/customize_form/test_customize_form.py +++ b/frappe/custom/doctype/customize_form/test_customize_form.py @@ -201,6 +201,13 @@ class TestCustomizeForm(unittest.TestCase): self.assertTrue(d.flags.update_db) + length = frappe.db.sql("""SELECT character_maximum_length + FROM information_schema.columns + WHERE table_name = 'tabNotification Log' + AND column_name = 'document_name'""")[0][0] + + self.assertEqual(length, 255) + def test_custom_link(self): try: # create a dummy doctype linked to Event