Commit graph

10 commits

Author SHA1 Message Date
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
d2d1b14cc6 fix: Always allow meta/standard fields in perm level
Perm levels CANNOT applied on these fields so these should ALWAYS be allowed.
2024-01-29 20:00:41 +05:30
Raffael Meyer
5fce1a57c0
fix: validate fieldname in get_group_by_count (#21932)
* fix: validate fieldname in get_group_by_count

* test: call get_group_by_count with invalid field

* test: is_default_field
2023-08-06 17:33:34 +05:30
Gavin D'souza
db209cbdf7 fix: Permit no fields if dt is table and no parenttype is specified 2023-02-06 13:33:49 +05:30
Gavin D'souza
4648c287f9 fix(meta): get_permitted_fields
Don't return any fields if user doesn't have permission for at least one
field
2023-02-04 11:55:02 +05:30
Gavin D'souza
c18c73d8c5 test: Add test for get_permitted_fields without parenttype 2023-02-03 22:23:14 +05:30
Gavin D'souza
e3d9c210a8 test: Added test for get_permitted_fields 2023-02-03 21:25:56 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Sagar Vora
f9bfbfec98
perf: reduce DB calls made in get_fetch_values (#17671)
* perf: reduce DB calls made in `get_fetch_values`

* fix: ensure return value is same as before

* test: add test for `frappe.model.utils.get_fetch_values`
2022-08-05 11:52:37 +05:30