From 29da865d45dee5d09925afa77c988122c652778e Mon Sep 17 00:00:00 2001 From: Julie Pichon Date: Fri, 27 Jun 2014 21:41:05 +0100 Subject: [PATCH] Make xvfbwrapper import dependent on the selenium imports It will not be required unless Selenium is also present. Change-Id: I9da1c596ad68b68c3ce4e8cd215646209dbaebe7 Closes-Bug: #1336243 --- horizon/test/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horizon/test/helpers.py b/horizon/test/helpers.py index 864e51a500..c5a1213760 100644 --- a/horizon/test/helpers.py +++ b/horizon/test/helpers.py @@ -32,7 +32,6 @@ from django import test as django_test from django.test.client import RequestFactory # noqa from django.utils.encoding import force_unicode from django.utils import unittest -import xvfbwrapper LOG = logging.getLogger(__name__) @@ -40,6 +39,7 @@ LOG = logging.getLogger(__name__) try: from horizon.test.webdriver import WebDriver # noqa from selenium.webdriver.support import ui as selenium_ui + import xvfbwrapper # Only needed when running the Selenium tests headless except ImportError as e: # NOTE(saschpe): Several distribution can't ship selenium due to its # non-free license. So they have to patch it out of test-requirements.txt