Tests: check initial configuration in test_routing.py.

This commit is contained in:
Andrey Zelenkov
2019-10-23 16:05:40 +03:00
parent 1bece759a3
commit 31bbc755fd

View File

@@ -8,34 +8,38 @@ class TestRouting(TestApplicationProto):
def setUp(self): def setUp(self):
super().setUp() super().setUp()
self.conf( self.assertIn(
{ 'success',
"listeners": {"*:7080": {"pass": "routes"}}, self.conf(
"routes": [ {
{ "listeners": {"*:7080": {"pass": "routes"}},
"match": {"method": "GET"}, "routes": [
"action": {"pass": "applications/empty"}, {
} "match": {"method": "GET"},
], "action": {"pass": "applications/empty"},
"applications": { }
"empty": { ],
"type": "python", "applications": {
"processes": {"spare": 0}, "empty": {
"path": self.current_dir + '/python/empty', "type": "python",
"working_directory": self.current_dir "processes": {"spare": 0},
+ '/python/empty', "path": self.current_dir + '/python/empty',
"module": "wsgi", "working_directory": self.current_dir
+ '/python/empty',
"module": "wsgi",
},
"mirror": {
"type": "python",
"processes": {"spare": 0},
"path": self.current_dir + '/python/mirror',
"working_directory": self.current_dir
+ '/python/mirror',
"module": "wsgi",
},
}, },
"mirror": { }
"type": "python", ),
"processes": {"spare": 0}, 'routing configure',
"path": self.current_dir + '/python/mirror',
"working_directory": self.current_dir
+ '/python/mirror',
"module": "wsgi",
},
},
}
) )
def route(self, route): def route(self, route):