Преглед изворни кода

test: add test for limit

version-14
Pruthvi Patel пре 3 година
родитељ
комит
a87899c215
1 измењених фајлова са 5 додато и 0 уклоњено
  1. +5
    -0
      frappe/tests/test_document.py

+ 5
- 0
frappe/tests/test_document.py Прегледај датотеку

@@ -252,3 +252,8 @@ class TestDocument(unittest.TestCase):
'currency': 100000
})
self.assertEquals(d.get_formatted('currency', currency='INR', format="#,###.##"), '₹ 100,000.00')

def test_limit_for_get(self):
doc = frappe.get_doc("DocType", "DocType")
# assuming DocType has more that 3 Data fields
self.assertEquals(len(doc.get("fields", filters={"fieldtype": "Data"}, limit=3)), 3)

Loading…
Откажи
Сачувај