Skip to content
Myr

Added testcase. This fixes #108

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 6fca662 · Browse files · 3 files+14 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

3 files+14 added−0 removed

  • tests:+14 added−0 removed

3 files+14 added−0 removed

added:tests/subdomaintestmodule/static/hello.txt+1 added
1Hello Subdomain
added:tests/subdomaintestmodule/__init__.py+4 added
1from flask import Module234mod = Module(__name__, 'foo', subdomain='foo')
modified:tests/flask_tests.py+9 added
1100 unmodified lines
11011102 rv = c.get('/', 'http://test.localhost/')1103 assert rv.data == 'test index'11041105 def test_module_static_path_subdomain(self):1106 app = flask.Flask(__name__)1107 app.config['SERVER_NAME'] = 'example.com'1108 from subdomaintestmodule import mod1109 app.register_module(mod)1110 c = app.test_client()1111 rv = c.get('/static/hello.txt', 'http://foo.example.com/')1112 assert rv.data.strip() == 'Hello Subdomain'11131114 def test_subdomain_matching(self):1115 app = flask.Flask(__name__)1116 app.config['SERVER_NAME'] = 'localhost'1117 @app.route('/', subdomain='<user>')
135 unmodified lines