* fix(utils): add type hints to whitelisted methods
* fix(desktop): add type hints to whitelisted methods
* fix(listview): add type hints to whitelisted methods
* fix(access_log): add type hints to whitelisted methods
* fix(setup_wizard): add type hints to whitelisted methods
* fix(notification_settings): add type hints to whitelisted methods
* fix(calendar): add type hints to whitelisted methods
* fix(notifications): add type hints to whitelisted methods
* fix(query_report): add type hints to whitelisted methods
* fix(load): add type hints to whitelisted methods
* fix(save): add type hints to whitelisted methods
* fix(user): add type hints to whitelisted methods
* fix: correct Document import
* fix(list_view_settings): add type hints to whitelisted methods
* fix(reportview): add type hints to whitelisted methods
* fix(treeview): add type hints to whitelisted methods
* fix(linked_with): add type hints to whitelisted methods
* fix(bulk_update): add type hints to whitelisted methods
* fix(assign_to): add type hints to whitelisted methods
* fix(workspace): add type hints to whitelisted methods
* fix(kanban_board): add type hints to whitelisted methods
* fix(event): add type hints to whitelisted methods
* fix(email): add type hints to whitelisted methods
* fix(exporter): add type hints to whitelisted methods
* fix(permission_manager): add type hints to whitelisted methods
* fix(dashboard_chart): add type hints to whitelisted methods
* fix(number_card): add type hints to whitelisted methods
* fix(tag): add type hints to whitelisted methods
* fix: add hook to force type hints on all whitelisted endpoints
* fix: target_doc can be dict/json string
* fix: doc can be dict/json string
* fix(tests): add type hints to whitelisted methods in test
* fix: tree method is optional
* test: Fix test api types
* chore: drop dead code
* fix: document can be int
* fix: Number card input can be document
As utils in some other API calls
* fix: Always use session user
The only usage of this API that makes sense.
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: use secret for auth. between servers
* fix(security): use redis for server auth.
* fix: use socket.io directly to fetch secret from redis
* refactor: Socket secret can be bench specific
- No need to keep it site specific.
* fix: don't return anything if secrets dont match
* test: rewrite test to factor in server-to-server communication only
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
- Moved whitelist_for_tests decorator from ui_test_helpers to frappe.tests.utils
- Enhanced decorator to accept kwargs for passing to frappe.whitelist()
- Applied decorator consistently to test endpoints in:
- test_api.py
- test_api_v2.py
- test_caching.py
- test_search.py
- Updated all imports to use direct import from frappe.tests.utils
* fix: remove doctypes,workspace blocks, files
* fix: minor python tests and UI tests
* fix: remove blog post from tests
* fix: remove blogger as role for tests
* fix: add check for if doctype exists
* fix: ui test
* fix: more cleanup
* fix: cleanup comments and fix test_query
* fix: resolve conflicts
* fix: add warning and handle comments
* feat: global `frappe.in_test` flag
* feat: helper utility to toggle `frappe.in_test`
* fix: use `toggle_test_mode` util
* fix: use `frappe.in_test`
* chore: add comment explaining global `in_test`
* chore: ignore commit replacing flag usage
* test: temporarily disable `frappe.in_test`
this worked earlier because flag was set in werkzeug.local which was separate for API test client
* test: add comment explaining change
* fix: Avoid Snapshot violation
- Main thread created and "read" user
- Other thread modified something
- Main thread wants to delete or "write" to same row.
This violates snapshot isolation.
* fix: treat snapshot violation as deadlock for now
* test: handle snapshot violations