Skip to content

Commit 6c63898

Browse files
committed
[tests] Control SELENIUM_HEADLESS via env var
1 parent 7474f58 commit 6c63898

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

openwisp_utils/test_selenium_mixins.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22

3-
from django.conf import settings
43
from selenium import webdriver
54
from selenium.webdriver.common.by import By
65
from selenium.webdriver.firefox.options import Options
@@ -23,7 +22,7 @@ def setUpClass(cls):
2322
super().setUpClass()
2423
firefox_options = Options()
2524
firefox_options.page_load_strategy = 'eager'
26-
if getattr(settings, 'SELENIUM_HEADLESS', True):
25+
if os.environ.get('SELENIUM_HEADLESS', False):
2726
firefox_options.add_argument('--headless')
2827
GECKO_BIN = os.environ.get('GECKO_BIN', None)
2928
if GECKO_BIN:

tests/openwisp2/settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
SECRET_KEY = '@s8$swhj9du^aglt5+@ut^)wepr+un1m7r*+ixcq(-5i^st=y^'
66

7-
SELENIUM_HEADLESS = True if os.environ.get('SELENIUM_HEADLESS', False) else False
8-
97
DEBUG = True
108

119
ALLOWED_HOSTS = []

0 commit comments

Comments
 (0)