Tweak test file

This commit is contained in:
dgtlmoon
2024-07-18 10:59:32 +02:00
parent d55f4727a2
commit d0ecee7794
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -38,4 +38,5 @@ pytest tests/test_rss.py
pytest tests/test_unique_lines.py
# Check file:// will pickup a file when enabled
echo "Hello world" > /tmp/test-file.txt
ALLOW_FILE_URI=yes pytest tests/test_security.py
+3 -3
View File
@@ -64,7 +64,7 @@ def test_bad_access(client, live_server, measure_memory_usage):
def test_file_access(client, live_server, measure_memory_usage):
#live_server_setup(live_server)
test_file_path = os.path.join(os.getcwd(), "..", "README.md")
test_file_path = "/tmp/test-file.txt"
# file:// is permitted by default, but it will be caught by ALLOW_FILE_URI
client.post(
@@ -82,8 +82,8 @@ def test_file_access(client, live_server, measure_memory_usage):
follow_redirects=True
)
# Should see something from the README.md
assert b"release-shield" in res.data
# Should see something (this file added by run_basic_tests.sh)
assert b"Hello world" in res.data
else:
# Default should be here
assert b'file:// type access is denied for security reasons.' in res.data