summaryrefslogtreecommitdiffhomepage
path: root/test/test_static_share.py
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /test/test_static_share.py
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-1.30.0-1.tar.gz
unit-1.30.0-1.tar.bz2
Merged with the default branch.1.30.0-1
Diffstat (limited to '')
-rw-r--r--test/test_static_share.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/test_static_share.py b/test/test_static_share.py
index 5384866e..0166f1f0 100644
--- a/test/test_static_share.py
+++ b/test/test_static_share.py
@@ -10,16 +10,16 @@ class TestStaticShare(TestApplicationProto):
@pytest.fixture(autouse=True)
def setup_method_fixture(self, temp_dir):
- os.makedirs(temp_dir + '/assets/dir')
- os.makedirs(temp_dir + '/assets/dir2')
+ os.makedirs(f'{temp_dir}/assets/dir')
+ os.makedirs(f'{temp_dir}/assets/dir2')
- Path(temp_dir + '/assets/dir/file').write_text('1')
- Path(temp_dir + '/assets/dir2/file2').write_text('2')
+ Path(f'{temp_dir}/assets/dir/file').write_text('1')
+ Path(f'{temp_dir}/assets/dir2/file2').write_text('2')
assert 'success' in self.conf(
{
"listeners": {"*:7080": {"pass": "routes"}},
- "routes": [{"action": {"share": temp_dir + "/assets$uri"}}],
+ "routes": [{"action": {"share": f'{temp_dir}/assets$uri'}}],
"applications": {},
}
)
@@ -31,7 +31,7 @@ class TestStaticShare(TestApplicationProto):
assert self.get(url='/dir/file')['body'] == '1'
assert self.get(url='/dir2/file2')['body'] == '2'
- self.action_update({"share": [temp_dir + "/assets/dir$uri"]})
+ self.action_update({"share": [f'{temp_dir}/assets/dir$uri']})
assert self.get(url='/file')['body'] == '1'
assert self.get(url='/file2')['status'] == 404
@@ -39,8 +39,8 @@ class TestStaticShare(TestApplicationProto):
self.action_update(
{
"share": [
- temp_dir + "/assets/dir$uri",
- temp_dir + "/assets/dir2$uri",
+ f'{temp_dir}/assets/dir$uri',
+ f'{temp_dir}/assets/dir2$uri',
]
}
)
@@ -51,8 +51,8 @@ class TestStaticShare(TestApplicationProto):
self.action_update(
{
"share": [
- temp_dir + "/assets/dir2$uri",
- temp_dir + "/assets/dir3$uri",
+ f'{temp_dir}/assets/dir2$uri',
+ f'{temp_dir}/assets/dir3$uri',
]
}
)