Fixed error when DEVELOPMENT env var is not set

This commit is contained in:
axl89 2016-06-03 16:58:20 +02:00
parent 23842a932e
commit c3a9b21010
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ class PandoraWebDriverTestCase(TestCase):
def setUp(self): def setUp(self):
self.time_started = datetime.now() self.time_started = datetime.now()
#Start VM in Sauce Labs #Start VM in Sauce Labs
if environ["DEVELOPMENT"] == "1": is_development = os.getenv('DEVELOPMENT', False)
if is_development != False:
self.driver = webdriver.Firefox() self.driver = webdriver.Firefox()
else: else:
self.driver = webdriver.Remote(command_executor='http://'+self.sauce_username+':'+self.sauce_access_key+'@ondemand.saucelabs.com:80/wd/hub',desired_capabilities=self.desired_cap) self.driver = webdriver.Remote(command_executor='http://'+self.sauce_username+':'+self.sauce_access_key+'@ondemand.saucelabs.com:80/wd/hub',desired_capabilities=self.desired_cap)