From 367b254c787c59b208899f1dfee78904c1784c73 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 26 Aug 2011 14:51:28 +0100 Subject: [PATCH] Make sure that there is a test for subdomain matching with ports --- flask/testsuite/basic.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flask/testsuite/basic.py b/flask/testsuite/basic.py index d09ec92e..947d0073 100644 --- a/flask/testsuite/basic.py +++ b/flask/testsuite/basic.py @@ -961,6 +961,17 @@ class SubdomainTestCase(FlaskTestCase): rv = c.get('/', 'http://mitsuhiko.localhost/') self.assert_equal(rv.data, 'index for mitsuhiko') + def test_subdomain_matching_with_ports(self): + app = flask.Flask(__name__) + app.config['SERVER_NAME'] = 'localhost:3000' + @app.route('/', subdomain='') + def index(user): + return 'index for %s' % user + + c = app.test_client() + rv = c.get('/', 'http://mitsuhiko.localhost:3000/') + self.assert_equal(rv.data, 'index for mitsuhiko') + @emits_module_deprecation_warning def test_module_subdomain_support(self): app = flask.Flask(__name__)