summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_atexit.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-01-30 16:16:52 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-01-30 16:16:52 +0300
commit9f48f2b3e78d268c39dbd772a0a0f9ef07530846 (patch)
tree31192ccbf0d89b9b31e473a39195cb7477a780e5 /test/test_python_atexit.py
parentf115cb7032dc0a2a2fa5ef6f66167efdd6b93544 (diff)
downloadunit-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.py38
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