ソースを参照

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 'currency': 100000
}) })
self.assertEquals(d.get_formatted('currency', currency='INR', format="#,###.##"), '₹ 100,000.00') 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)

読み込み中…
キャンセル
保存