9.2 As Always, Start with a Test
parent
2b42be9815
commit
830c5c01ee
|
@ -4,7 +4,7 @@ from selenium import webdriver
|
||||||
from selenium.webdriver.common.keys import Keys
|
from selenium.webdriver.common.keys import Keys
|
||||||
from selenium.common.exceptions import WebDriverException
|
from selenium.common.exceptions import WebDriverException
|
||||||
import time
|
import time
|
||||||
import unittest
|
import os
|
||||||
|
|
||||||
MAX_WAIT = 10
|
MAX_WAIT = 10
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@ class NewVisitorTest(StaticLiveServerTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.browser = webdriver.Firefox()
|
self.browser = webdriver.Firefox()
|
||||||
|
staging_server = os.environ.get('STAGING_SERVER')
|
||||||
|
if staging_server:
|
||||||
|
self.live_server_url = 'http://' + staging_server
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.browser.quit()
|
self.browser.quit()
|
||||||
|
@ -69,7 +72,6 @@ class NewVisitorTest(StaticLiveServerTestCase):
|
||||||
# Edith wonders whether the site will remember her list. Then she sees
|
# 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
|
# that the site has generated a unique URL for her -- there is some
|
||||||
# explanatory text to that effect.
|
# explanatory text to that effect.
|
||||||
self.fail('Finish the test!')
|
|
||||||
|
|
||||||
# She visits that URL - her to-do list is still there.
|
# She visits that URL - her to-do list is still there.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue