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
071e269548
fix!: Switch to creation as default sort order
2024-03-27 11:18:28 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Sagar Vora
81d5160ac1
test: ensure stricter filters when validate_filters is passed
2023-05-31 14:16:52 +05:30
Sagar Vora
9f5a994f70
fix!: improved filter validation in Engine.get_query
2023-05-31 14:16:52 +05:30
Faris Ansari
7e7b1e024a
test: for child query in qb.get_query
2023-05-08 18:55:11 +05:30
Faris Ansari
543458b473
fix: handle empty list as filters
2023-01-16 15:38:15 +05:30
Faris Ansari
5bc5ff100b
test: tests for various filter options
2023-01-16 14:12:04 +05:30
Faris Ansari
b7c0ba1bea
fix: allow dynamic fields in filters
...
e.g.,
`filters={'link.field': 'value'}`
`filters={'child.field': 'value'}`
2022-12-31 22:55:00 +05:30
Faris Ansari
7ca39a81bf
fix: explicitly specifiy order
2022-12-31 22:18:07 +05:30
Faris Ansari
726fcfdb79
refactor: qb.engine
...
- simplify
- qb.engine.get_query -> qb.get_query
- qb.engine.build_conditions -> qb.get_query
2022-12-25 23:19:11 +05:30
phot0n
dfe62f2614
test: use double quotes for postgres query assertions
2022-11-03 12:50:38 +05:30
Aradhya
e1719fd30c
feat: Added support for table_field.fieldname and tests
2022-11-03 03:56:59 +05:30
Aradhya
88d506864b
refactor: consistent quries and better naming
2022-11-02 17:21:37 +05:30
Aradhya
97b0b743ae
test: Updated tests for parenttype condition
2022-11-02 02:40:23 +05:30
Aradhya
5703303abb
Merge branch 'develop' of https://github.com/frappe/frappe into qb-fixes
2022-11-01 13:45:11 +05:30
Ankush Menat
fec24632a9
style: format
...
[skip ci]
2022-11-01 13:36:37 +05:30
Aradhya Tripathi
5ed696cd3d
fix(qb): fixed implicit join for child tables ( #18692 )
...
* test: Added test for multiple joins
2022-11-01 11:25:02 +05:30
Aradhya
84c8cb8705
test: Added more tests
2022-10-31 19:16:00 +05:30
Aradhya
e6a281f19e
refactor: better naming
2022-10-27 13:11:15 +05:30
Aradhya
6198177ec6
test: Added tests for ancestors
2022-10-27 12:58:17 +05:30
Aradhya
15db8228f4
fix: adding additional conditions
2022-10-26 15:58:24 +05:30
Aradhya
7d18d5f519
test: Added tests for nested set queries
2022-10-25 20:42:33 +05:30
Aradhya Tripathi
457de5c6b3
fix: stripping comments sent to the database API ( #18229 )
...
* feat: stripping comments sent to the database API
* test: Added tests for comment stripping
* fix: only stripping comments in string fields
* refactor: removing on the fly mutations
* refactor: added helper to avoid mutations
* refactor: simplify sanitization
* refactor: removing indexing from everywhere
* refactor: readable functions
* test: only run mdb test on mdb
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-12 16:36:55 +05:30
Aradhya Tripathi
e73ae6f039
Merge branch 'develop' into get-all-mod
2022-08-19 15:42:35 +05:30
Aradhya
0addffafb9
refactor: minor changes
2022-08-17 19:52:51 +05:30
Ankush Menat
3e2d2a703a
test: Use FrappeTestCase everywhere
2022-08-17 16:39:42 +05:30
Aradhya
4d41465dc3
test: updated to run tests on maria db only
2022-08-14 14:57:04 +05:30
Aradhya
85d1e41738
fix: fixed join query from fields
2022-08-10 23:42:01 +05:30
Aradhya
6c905233c5
feat: Added support for string filters in query
2022-07-28 23:55:58 +05:30
Aradhya
1ae3b7f16b
feat: Added support for fields in Locate
2022-07-27 21:22:38 +05:30
Aradhya
8624afdf6c
test: Added tests for "`" in alias name
2022-07-27 18:39:31 +05:30
Aradhya
41f62ba0d2
fix: converting back to capitalized doctype names
2022-07-26 19:33:45 +05:30
Aradhya
a7d74266d2
feat: Flexible pseudocolumns
2022-07-24 15:40:48 +05:30
Aradhya
3d6247efbd
refactor: removed unnecesary pseudocolumns
2022-07-24 14:27:51 +05:30
Aradhya
3802d83900
test: Added test for "``" query
2022-07-24 01:39:53 +05:30
Aradhya
64463791a1
feat: Added support for multiple functions in string fields & fixed aliasing
2022-07-12 22:07:11 +05:30
Aradhya
dbbd9e9095
fix: removing functions from strings when alias is same as function name
2022-07-12 17:59:37 +05:30
Aradhya
613065fa2e
feat: Added support for aliasing in function objects
2022-07-09 22:27:29 +05:30
Aradhya
2fac4f8074
test: Added tests for timestamp
2022-07-08 21:33:58 +05:30
Aradhya
4da5fdcd02
fix: fixed spaces in args
...
fix: lint
2022-06-29 17:37:49 +05:30
Gavin D'souza
ee18694b1b
test(fix): Import Max for test_functions_fields
2022-06-29 10:40:21 +05:30
Aradhya
6db6be1f3c
refactor: frappe.qb.engine
...
* Small fixes in set_fields and clean code
* Optimize casefolds
* Fixed functions passed in List
* get_sql => get_query - more expressive, less confusion
* Updated tests
2022-06-28 19:43:57 +05:30
Aradhya
4af2e1e886
refactor: replaced frappe.db.query with frappe.qb.engine
2022-06-28 19:43:50 +05:30
Aradhya
960952cfc3
feat(qb-engine): Added Aggregation function support
...
* Added Min, Max
* Added tests
2022-06-28 19:41:39 +05:30
saxenabhishek
ba51289c37
test: update test_multiple_tables_in_filters
2022-04-28 17:10:31 +05:30
saxenabhishek
b1a0a3816b
style: Applied Frappe linting
2022-04-28 17:10:31 +05:30
saxenabhishek
3498445733
test: multiple_tables_in_filters
2022-04-28 17:10:31 +05:30