diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-01-30 16:16:52 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-01-30 16:16:52 +0300 |
commit | 9f48f2b3e78d268c39dbd772a0a0f9ef07530846 (patch) | |
tree | 31192ccbf0d89b9b31e473a39195cb7477a780e5 /test/test_python_atexit.py | |
parent | f115cb7032dc0a2a2fa5ef6f66167efdd6b93544 (diff) | |
download | unit-9f48f2b3e78d268c39dbd772a0a0f9ef07530846.tar.gz unit-9f48f2b3e78d268c39dbd772a0a0f9ef07530846.tar.bz2 |
Tests: added methods to manage unit configuration.
Diffstat (limited to 'test/test_python_atexit.py')
-rw-r--r-- | test/test_python_atexit.py | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/test/test_python_atexit.py b/test/test_python_atexit.py index 6c1b6365..6b93367c 100644 --- a/test/test_python_atexit.py +++ b/test/test_python_atexit.py @@ -28,32 +28,28 @@ def application(env, start_response): self.python_application(name, code) - self.put('/', """ - { - "listeners": { - "*:7080": { - "application": "app" - } - }, - "applications": { - "app": { - "type": "python", - "workers": 1, - "path": "%s", - "module": "wsgi" - } + self.conf({ + "listeners": { + "*:7080": { + "application": "app" + } + }, + "applications": { + "app": { + "type": "python", + "workers": 1, + "path": self.testdir + '/' + name, + "module": "wsgi" } } - """ % (self.testdir + '/' + name)) + }) unit.TestUnitHTTP.get() - self.put('/', """ - { - "listeners": {}, - "applications": {} - } - """) + self.conf({ + "listeners": {}, + "applications": {} + }) time.sleep(0.2) # wait for 'atexit' file |