From bcd746e8cf0fc5f405c5f32b80517a4390de6fd9 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 29 Jun 2010 01:36:06 +0200 Subject: [PATCH] Added another testcase for subdomain support --- tests/flask_tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/flask_tests.py b/tests/flask_tests.py index cbf2711f..1c5dc729 100644 --- a/tests/flask_tests.py +++ b/tests/flask_tests.py @@ -855,6 +855,17 @@ class SubdomainTestCase(unittest.TestCase): rv = c.get('/', 'http://test.localhost/') assert rv.data == 'test index' + def test_subdomain_matching(self): + app = flask.Flask(__name__) + app.config['SERVER_NAME'] = 'localhost' + @app.route('/', subdomain='') + def index(user): + return 'index for %s' % user + + c = app.test_client() + rv = c.get('/', 'http://mitsuhiko.localhost/') + assert rv.data == 'index for mitsuhiko' + def suite(): from minitwit_tests import MiniTwitTestCase