From 830c5c01ee86b9db20f2fe8c47fb0e96cc7f9e9d Mon Sep 17 00:00:00 2001 From: JasonHomeWorkstationUbuntu Date: Thu, 12 Nov 2020 13:28:05 +1100 Subject: [PATCH] 9.2 As Always, Start with a Test --- src/functional_tests/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/functional_tests/tests.py b/src/functional_tests/tests.py index c856329..00017b5 100644 --- a/src/functional_tests/tests.py +++ b/src/functional_tests/tests.py @@ -4,7 +4,7 @@ from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import WebDriverException import time -import unittest +import os MAX_WAIT = 10 @@ -12,6 +12,9 @@ class NewVisitorTest(StaticLiveServerTestCase): def setUp(self): self.browser = webdriver.Firefox() + staging_server = os.environ.get('STAGING_SERVER') + if staging_server: + self.live_server_url = 'http://' + staging_server def tearDown(self): self.browser.quit() @@ -69,7 +72,6 @@ class NewVisitorTest(StaticLiveServerTestCase): # Edith wonders whether the site will remember her list. Then she sees # that the site has generated a unique URL for her -- there is some # explanatory text to that effect. - self.fail('Finish the test!') # She visits that URL - her to-do list is still there.