mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 14:32:16 +00:00
Bypass hCaptcha in automated testing
This commit is contained in:
@@ -187,7 +187,10 @@ LOGOUT_URL = '/user/logout/'
|
||||
ACCOUNT_ACTIVATION_DAYS = 7
|
||||
|
||||
# CAPTCHA settings
|
||||
if not DEBUG:
|
||||
if DEBUG or CI:
|
||||
HCAPTCHA_SITEKEY = '10000000-ffff-ffff-ffff-000000000001'
|
||||
HCAPTCHA_SECRET = '0x0000000000000000000000000000000000000000'
|
||||
else:
|
||||
HCAPTCHA_SITEKEY = env('HCAPTCHA_SITEKEY')
|
||||
HCAPTCHA_SECRET = env('HCAPTCHA_SECRET')
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ def create_datetime(year, month, day, hour, minute):
|
||||
def create_browser():
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_argument("--window-size=1920,1080")
|
||||
options.add_argument("--headless")
|
||||
#options.add_argument("--headless")
|
||||
if settings.CI:
|
||||
options.add_argument("--no-sandbox")
|
||||
driver = webdriver.Chrome(options=options)
|
||||
|
||||
Reference in New Issue
Block a user