From 4246b315d04f493aedf8cbe413d5a807a8134b17 Mon Sep 17 00:00:00 2001 From: jpic Date: Mon, 6 Apr 2015 23:39:09 +0200 Subject: [PATCH] Use firefox by default, phantom in travis --- .travis.yml | 1 + autocomplete_light/tests/test_widget.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 66074899a..876fc0d7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ python: env: global: - TESTS_SKIP_LIVESERVER=1 + - TESTS_USE_PHANTOMJS=1 - PIP_DISABLE_PIP_VERSION_CHECK=true - BASEREQ="tox" - USE_POSTGRES=0 diff --git a/autocomplete_light/tests/test_widget.py b/autocomplete_light/tests/test_widget.py index 28a03335b..67a03d435 100644 --- a/autocomplete_light/tests/test_widget.py +++ b/autocomplete_light/tests/test_widget.py @@ -53,7 +53,12 @@ class WidgetTestCase(LiveServerTestCase): def setUpClass(cls): if os.environ.get('TESTS_SKIP_LIVESERVER', False): raise unittest.SkipTest('TESTS_SKIP_LIVESERVER enabled') - cls.selenium = webdriver.PhantomJS() + + if os.environ.get('TESTS_USE_PHANTOMJS', False): + cls.selenium = webdriver.PhantomJS() + else: + cls.selenium = webdriver.Firefox() + cls.selenium.implicitly_wait(WAIT_TIME) super(WidgetTestCase, cls).setUpClass()