Make sure that there is a test for subdomain matching with ports

This commit is contained in:
Armin Ronacher 2011-08-26 14:51:28 +01:00
parent 67101c8b93
commit 367b254c78

View file

@ -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='<user>')
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__)