fix: allow whitelist_for_tests in CI environment
The CI check was incorrectly nested inside the dev_server condition, preventing test endpoints from being accessible during CI runs using bench execute. Now CI is checked independently.
This commit is contained in:
parent
eac218216b
commit
11235f6b3a
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ def whitelist_for_tests(**whitelist_kwargs):
|
|||
@wraps(fn)
|
||||
def wrapper(*args, **kwargs):
|
||||
if not (
|
||||
frappe.in_test or (frappe._dev_server and (frappe.conf.allow_tests or os.environ.get("CI")))
|
||||
frappe.in_test or (frappe._dev_server and frappe.conf.allow_tests) or os.environ.get("CI")
|
||||
):
|
||||
frappe.throw( # nosemgrep: frappe-missing-translate-function-python
|
||||
'Test endpoints are only available when running in test mode or running a development server ("bench start") with the "allow_tests" site config enabled'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue