diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2020-10-07 23:18:43 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2020-10-07 23:18:43 +0100 |
commit | 6ec0ff35964c7805712d978625949f72ff5a63bc (patch) | |
tree | f64a1901993fbc7e6a75ca6335fbbd291c8cce56 /test/test_asgi_lifespan.py | |
parent | 645683f432d742f42f2769f589fe769585fb7aa0 (diff) | |
download | unit-6ec0ff35964c7805712d978625949f72ff5a63bc.tar.gz unit-6ec0ff35964c7805712d978625949f72ff5a63bc.tar.bz2 |
Tests: minor fixes.
Diffstat (limited to '')
-rw-r--r-- | test/test_asgi_lifespan.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/test_asgi_lifespan.py b/test/test_asgi_lifespan.py index 3d6fdcce..c37a1aae 100644 --- a/test/test_asgi_lifespan.py +++ b/test/test_asgi_lifespan.py @@ -1,9 +1,11 @@ import os -import pytest from distutils.version import LooseVersion +import pytest + +from conftest import option +from conftest import public_dir from unit.applications.lang.python import TestApplicationPython -from conftest import option, public_dir class TestASGILifespan(TestApplicationPython): @@ -19,11 +21,16 @@ class TestASGILifespan(TestApplicationPython): shutdown_path = option.test_dir + '/python/lifespan/empty/shutdown' version_path = option.test_dir + '/python/lifespan/empty/version' + os.chmod(option.test_dir + '/python/lifespan/empty', 0o777) + open(startup_path, 'a').close() + os.chmod(startup_path, 0o777) + open(shutdown_path, 'a').close() - open(version_path, 'a').close() + os.chmod(shutdown_path, 0o777) - public_dir(option.test_dir + '/python/lifespan/empty') + open(version_path, 'a').close() + os.chmod(version_path, 0o777) assert self.get()['status'] == 204 |