Browse Source

Hacked FT runner to test staging

david 5 years ago
parent
commit
1c8b952b81
1 changed files with 4 additions and 1 deletions
  1. 4 1
      functional_tests/tests.py

+ 4 - 1
functional_tests/tests.py

@@ -2,7 +2,7 @@ from django.contrib.staticfiles.testing import StaticLiveServerTestCase
 from selenium import webdriver
 from selenium.webdriver.common.keys import Keys
 from selenium.common.exceptions import WebDriverException
-import time
+import time, os
 
 MAX_WAIT = 10
 
@@ -11,6 +11,9 @@ class NewVisitorTest(StaticLiveServerTestCase):
     def setUp(self):
         #self.browser = webdriver.Firefox()
         self.browser = webdriver.Chrome()
+        staging_server = os.environ.get('STAGING_SERVER')  
+        if staging_server:
+            self.live_server_url = 'http://' + staging_server
 
     def tearDown(self):
         self.browser.quit()