Skip to content
Myr

Added another testcase for subdomain support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 7ea1b80 · Browse files · 1 file+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−0 removed

  • tests:+11 added−0 removed

1 file+11 added−0 removed

modified:tests/flask_tests.py+11 added
853 unmodified lines
854855 rv = c.get('/', 'http://test.localhost/')856 assert rv.data == 'test index'857858 def test_subdomain_matching(self):859 app = flask.Flask(__name__)860 app.config['SERVER_NAME'] = 'localhost'861 @app.route('/', subdomain='<user>')862 def index(user):863 return 'index for %s' % user864865 c = app.test_client()866 rv = c.get('/', 'http://mitsuhiko.localhost/')867 assert rv.data == 'index for mitsuhiko'868869870def suite():871 from minitwit_tests import MiniTwitTestCase872 from flaskr_tests import FlaskrTestCase873 suite = unittest.TestSuite()
17 unmodified lines