fix: allow insecure transport in tests

This commit is contained in:
barredterra 2020-10-18 19:34:43 +02:00
parent ab22f75b48
commit bf4fd67dbf

View file

@ -9,8 +9,8 @@ from frappe.model.document import Document
from requests_oauthlib import OAuth2Session
from urllib.parse import urljoin
if frappe.conf.developer_mode:
# Disable mandatory TLS in developer mode
if frappe.conf.developer_mode or frappe.flags.in_test:
# Disable mandatory TLS in developer mode and tests
import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'