Tests: added methods to manage unit configuration.

This commit is contained in:
Andrey Zelenkov
2018-01-30 16:16:52 +03:00
parent f115cb7032
commit 9f48f2b3e7
6 changed files with 240 additions and 253 deletions

View File

@@ -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