summaryrefslogtreecommitdiffhomepage
path: root/test/test_static_fallback.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2021-11-18 17:04:04 +0300
committerAndrei Belov <defan@nginx.com>2021-11-18 17:04:04 +0300
commitb400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7 (patch)
tree60ff49ffc16ef7cb3aad1beb2d78f051a8794cdf /test/test_static_fallback.py
parentfafd44166d9e835e91a4c5668048308ce99a62bd (diff)
parentb77895d1c7d6cd4826ac7427c91baa95b998a912 (diff)
downloadunit-b400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7.tar.gz
unit-b400ccd1aa8eeb6a5de1707e0bb8c3d417fe69b7.tar.bz2
Merged with the default branch.1.26.0-1
Diffstat (limited to 'test/test_static_fallback.py')
-rw-r--r--test/test_static_fallback.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_static_fallback.py b/test/test_static_fallback.py
index dc9056b9..71b268c8 100644
--- a/test/test_static_fallback.py
+++ b/test/test_static_fallback.py
@@ -2,7 +2,6 @@ import os
from pathlib import Path
import pytest
-
from unit.applications.proto import TestApplicationProto
@@ -23,7 +22,7 @@ class TestStaticFallback(TestApplicationProto):
"*:7080": {"pass": "routes"},
"*:7081": {"pass": "routes"},
},
- "routes": [{"action": {"share": temp_dir + "/assets"}}],
+ "routes": [{"action": {"share": temp_dir + "/assets$uri"}}],
"applications": {},
}
)
@@ -50,7 +49,7 @@ class TestStaticFallback(TestApplicationProto):
def test_static_fallback_valid_path(self, temp_dir):
self.action_update(
- {"share": temp_dir + "/assets", "fallback": {"return": 200}}
+ {"share": temp_dir + "/assets$uri", "fallback": {"return": 200}}
)
resp = self.get()
assert resp['status'] == 200, 'fallback status'
@@ -83,7 +82,7 @@ class TestStaticFallback(TestApplicationProto):
def test_static_fallback_share(self, temp_dir):
self.action_update(
- {"share": "/blah", "fallback": {"share": temp_dir + "/assets"},}
+ {"share": "/blah", "fallback": {"share": temp_dir + "/assets$uri"},}
)
resp = self.get()