Sambasiva Suda
7165f94148
fix: validate_email_addr should return email id as it is if it is valid ( #22613 )
2023-10-11 12:37:48 +05:30
David Arnold
414febab96
fix(test): ensure tests construe the site url from its constructor
2023-08-23 12:04:57 +02:00
Ankush Menat
cbe816347e
Merge pull request #22017 from GursheenK/implement-like-in-compare-util
...
feat: implement like in compare util
2023-08-11 22:16:12 +05:30
Ankush Menat
7a5a0c27a2
fix: Support SQL like LIKE filter
...
Other changes:
- Ignore empty doctype in filter creator
- Simplified recorder filter evals
2023-08-11 21:24:38 +05:30
Gursheen Anand
b019a1163c
feat: implement like & not like in compare util
2023-08-11 15:34:07 +05:30
Ankush Menat
a1f3114305
fix: sanitize frappe._dicts too in TB sanitizer ( #22012 )
2023-08-11 12:25:40 +05:30
gavin
faab26ce4f
Merge branch 'develop' into bump-pydantic-v2
2023-06-26 13:12:24 +05:30
Ankush Menat
b3840596fc
test: mock github API calls ( #21450 )
...
[skip ci]
2023-06-21 16:33:09 +05:30
Smit Vora
db6a06d204
fix: make sure number is not zero for bankers_rounding ( #21431 )
...
* fix: make sure num is not zero for bankers_rounding
* test: rounding near zero
---------
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-06-20 12:00:22 +05:30
Gavin D'souza
ae3a61b3fc
test: Add tests for Document arg validations
2023-06-07 19:26:32 +05:30
Gavin D'souza
5c2fe7c292
test: Add tests for validate_argument_types decorator
2023-06-07 17:17:13 +05:30
barredterra
44bb745035
fix: change pretty date expectations in test
2023-04-11 15:56:05 +02:00
Ankush Menat
dd2ac72a9a
fix: skip 0 for rounding
2023-03-13 14:16:39 +05:30
Ankush Menat
709edf1f55
fix: Make corrected bankers rounding default method
2023-03-13 13:10:51 +05:30
Ankush Menat
139d4a87b4
fix: corrected banker's rounding
...
closes https://github.com/frappe/frappe/issues/19570
2023-03-13 12:30:48 +05:30
Ankush Menat
97ca92e3d1
refactor: change rounding method names ( #20299 )
...
These are easy to understand.
Added third method for corrected banker's rounding.
2023-03-10 14:57:15 +05:30
Ankush Menat
68d8a8eadd
feat: implement custom rounding in JS
2023-03-08 12:13:42 +05:30
Ankush Menat
86b9ff4266
feat: Allow specifying rounding method in flt
2023-03-08 10:59:02 +05:30
Ankush Menat
48f63f53ab
feat: configurable rounding methods
2023-03-08 10:44:44 +05:30
Ritwik Puri
e7f28b08c9
fix: cast primary value in compare util if fieldtype is present ( #20092 )
...
* fix: cast primary value in compare util if fieldtype is present
* test: add test for date & datetime filters when using evaluate_filters
2023-02-28 16:50:52 +05:30
Ankush Menat
cd4d601ed4
fix: traceback sanitizer got extra positional args
2023-02-15 17:51:21 +05:30
Ankush Menat
70ee9272b1
fix: sanitize traceback for common secrets ( #19805 )
2023-01-27 12:44:33 +05:30
Ankush Menat
e31db5d502
fix: handle tel: links in emails ( #19635 )
2023-01-17 20:31:06 +05:30
Gavin D'souza
b8da76d483
test(typing-utils): Specify exc type
...
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-12-19 15:10:56 +05:30
Gavin D'souza
4fe260e09e
refactor: transform_parameter_types
...
- Switch to Pydantic which is under continuous development and can
support more types
- Equivalent Pydantic API will try to transform data if possible
- The previous point makes it such that we don't need to explicitly try
to parse each stringified int in app code since Pydantic can do this
- Drop typeguard since it did not handle 3.10+ native typing definitions
2022-12-15 13:47:05 +05:30
Gavin D'souza
73b0971a26
test: Add tests for typing validations
2022-12-15 13:47:05 +05:30
Ankush Menat
d389fffbb7
feat: inter-process file locks ( #19133 )
2022-12-06 16:31:51 +05:30
Anand Baburajan
bc0abd9cfd
feat(util): add is_last_day_of_the_month ( #18835 )
...
* feat: add is_last_day_of_the_month
2022-11-10 15:18:49 +05:30
Ankush Menat
3e2d2a703a
test: Use FrappeTestCase everywhere
2022-08-17 16:39:42 +05:30
Ankush Menat
53af10a064
refactor!: python pretty_date consistent with JS
...
Python pretty date was ceiling month and week instead of flooring them,
this is incorrect AND inconsistent with popular JS library pretty date
that we use on client side
2022-08-16 10:53:28 +05:30
Ankush Menat
9de31d03c1
refactor!: timespan utils consistent output
...
BREAKING CHANGE:
- `get_year_ending` returns datetime.date instead of str
- `get_timespan_date_range` will always return datetime.date ranges
2022-08-16 10:53:28 +05:30
Ankush Menat
3fa4ec1bd6
refactor: container utils and misc tests
2022-08-16 10:53:28 +05:30
Ankush Menat
ad4cb710f2
refactor: duplication in gravatar code
2022-08-16 10:53:28 +05:30
Ankush Menat
9bf9256049
test: validate name
2022-08-16 10:53:28 +05:30
Ankush Menat
26bf65b87c
test: phone number validation
2022-08-16 10:53:28 +05:30
Gavin D'souza
fca29b8f19
test: Add tests for Identicon & gravatar utils
2022-08-11 23:53:21 +05:30
Gavin D'souza
3968c32fa9
test: Add test for lazy_import
2022-08-11 23:53:21 +05:30
Gavin D'souza
0b15f8f9db
test: Add tests for make_random module
2022-08-11 23:53:21 +05:30
Ankush Menat
28fc208b51
test: sanitize_html attributes behaviour
2022-08-09 14:47:18 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features ( #17367 )
...
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Ankush Menat
59a9be4caf
refactor: simplify timegrain conditions
...
All special handling for timegrains is same as general handling, no idea why it's done
like this.
2022-06-08 11:53:14 +05:30
Ankush Menat
4085646495
fix: identify varkw in get_newargs
2022-05-29 17:11:58 +05:30
Ankush Menat
c3918e8e34
test: test get_newargs
2022-05-29 16:26:02 +05:30
Faris Ansari
d94d30dacc
test: set name to create client script
2022-04-13 18:36:44 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black ( #16453 )
...
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
saxenabhishek
1507751a01
test: test_app_name_parser
2022-03-22 14:17:01 +05:30
Ankush Menat
588fbe24ef
feat: testing utilities
2022-02-28 16:20:51 +05:30
ChillarAnand
89b0181a8a
test: Fix flaky permission test
2022-02-25 19:08:22 +05:30
Saqib Ansari
92aee42cf7
test: link titles are added to the doctype on getdoc
2022-02-12 13:01:35 +05:30
Saqib Ansari
de76ef6518
test: doctypes are added to link_title_map in boot_info
2022-02-12 13:01:06 +05:30