summaryrefslogtreecommitdiffhomepage
path: root/test/test_routing.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-10-23 16:05:40 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-10-23 16:05:40 +0300
commit31bbc755fdbede63a3680485b305d7c8e2fd00cb (patch)
treeb6430f55038008369a4c06820b40ad5f4b3562a0 /test/test_routing.py
parent1bece759a3615b97c0a78e204eff23d13bba052d (diff)
downloadunit-31bbc755fdbede63a3680485b305d7c8e2fd00cb.tar.gz
unit-31bbc755fdbede63a3680485b305d7c8e2fd00cb.tar.bz2
Tests: check initial configuration in test_routing.py.
Diffstat (limited to 'test/test_routing.py')
-rw-r--r--test/test_routing.py58
1 files changed, 31 insertions, 27 deletions
diff --git a/test/test_routing.py b/test/test_routing.py
index 20e3a1c4..f3106b56 100644
--- a/test/test_routing.py
+++ b/test/test_routing.py
@@ -8,34 +8,38 @@ class TestRouting(TestApplicationProto):
def setUp(self):
super().setUp()
- self.conf(
- {
- "listeners": {"*:7080": {"pass": "routes"}},
- "routes": [
- {
- "match": {"method": "GET"},
- "action": {"pass": "applications/empty"},
- }
- ],
- "applications": {
- "empty": {
- "type": "python",
- "processes": {"spare": 0},
- "path": self.current_dir + '/python/empty',
- "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",
+ self.assertIn(
+ 'success',
+ self.conf(
+ {
+ "listeners": {"*:7080": {"pass": "routes"}},
+ "routes": [
+ {
+ "match": {"method": "GET"},
+ "action": {"pass": "applications/empty"},
+ }
+ ],
+ "applications": {
+ "empty": {
+ "type": "python",
+ "processes": {"spare": 0},
+ "path": self.current_dir + '/python/empty',
+ "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",
+ },
},
- },
- }
+ }
+ ),
+ 'routing configure',
)
def route(self, route):