소스 검색

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)

불러오는 중...
취소
저장