updated NewVisitorTest() FT to instantiate StaticLiveServerTestCase instead, for containerization compatibility
This commit is contained in:
@@ -1,17 +1,20 @@
|
|||||||
from django.test import LiveServerTestCase
|
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.common.exceptions import WebDriverException
|
from selenium.common.exceptions import WebDriverException
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
from selenium.webdriver.common.keys import Keys
|
from selenium.webdriver.common.keys import Keys
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
MAX_WAIT = 5
|
MAX_WAIT = 5
|
||||||
|
|
||||||
class NewVisitorTest(LiveServerTestCase):
|
class NewVisitorTest(StaticLiveServerTestCase):
|
||||||
# Helper methods
|
# Helper methods
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.browser = webdriver.Firefox()
|
self.browser = webdriver.Firefox()
|
||||||
|
if test_server := os.environ.get('TEST_SERVER'):
|
||||||
|
self.live_server_url = 'http://' + test_server
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.browser.quit()
|
self.browser.quit()
|
||||||
|
|||||||
Reference in New Issue
Block a user