From 9f48f2b3e78d268c39dbd772a0a0f9ef07530846 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Tue, 30 Jan 2018 16:16:52 +0300 Subject: Tests: added methods to manage unit configuration. --- test/test_python_atexit.py | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'test/test_python_atexit.py') 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 -- cgit