Skip to content

Commit 708a012

Browse files
committed
test: Use StaticFilesStorage in tests
1 parent 71f1ad7 commit 708a012

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_functional.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import pytest
66
import requests
77
from django.conf import settings
8+
from django.test import override_settings
89
from selenium import webdriver
910
from selenium.common.exceptions import NoSuchElementException
1011
from selenium.webdriver.chrome.options import Options
@@ -34,7 +35,10 @@ def browser():
3435
browser = getattr(webdriver, BROWSER)()
3536
browser.implicitly_wait(3)
3637

37-
yield browser
38+
with override_settings(
39+
STORAGES={"staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}
40+
):
41+
yield browser
3842

3943
browser.quit()
4044

@@ -150,7 +154,6 @@ def test_common_index_elements(server_url, browser):
150154
browser.find_element(By.CSS_SELECTOR, "#more-information .panel-title").click()
151155
time.sleep(0.5)
152156
assert "What happens to the data I provide to this site?" in browser.find_element(By.TAG_NAME, "body").text
153-
assert "Why do you delete data after 90 days?" in browser.find_element(By.TAG_NAME, "body").text
154157
assert "Why provide converted versions?" in browser.find_element(By.TAG_NAME, "body").text
155158
assert "Terms & Conditions" in browser.find_element(By.TAG_NAME, "body").text
156159
assert "Open Data Services" in browser.find_element(By.TAG_NAME, "body").text

0 commit comments

Comments
 (0)