* fix: prevent submission of non-submittable doctype
* fix: updated failing test cases to use submittable doctype as required
* refactor: corrected to_docstatus and from_docstatus use
* fix: inherit submittability from parent for child tables
* Revert "fix: inherit submittability from parent for child tables"
This reverts commit ee83ee59b4f0596e2d402a1547e92b131ae49579.
* feat: introduce skip_docstatus_validation flag
* test: add test cases for skip_docstatus_validation flag and docstatus transition of non-submittable doctype
* refactor: prefer staticmethod decorator
* refactor: add cm register utility and keep cms in one file
* refactor: enter safe_exec enabled context (treewide)
* refactor: move trace fields to the other test context managers
* chore: marke all test_runner functions for deprecation
* chore: mark some tests.utils functions for deprecation (moved)
* chore: mark traced_field_conext for deprecation (moved)
* chore: placate semgrep in dumpster
* fix: show deprecation warnings per module in tests (incl. from dumpster)
* chore: remove use of deprecated functions from tests
* 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
We set defaults on creation of new doc but when you append a new child
doc on existing document it doesn't seem to set the defaults.
This seems like a bug and not a deliberate choice.
* fix: raise exception if doc before save is not found
* test: ensure error is raised when trying to save new doc using `doc.save()`
* chore: add comment explaining condition
* test: clearer name and docstring