Browse Source

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

pull/309/head
Armin Ronacher 13 years ago
parent
commit
367b254c78
  1. 11
      flask/testsuite/basic.py

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

Loading…
Cancel
Save