Removed deprecated module functionality
This commit is contained in:
parent
84ad89ffa4
commit
817b72d484
17 changed files with 2 additions and 453 deletions
|
|
@ -1305,18 +1305,6 @@ class SubdomainTestCase(FlaskTestCase):
|
|||
rv = c.get('/', 'http://test.localhost/')
|
||||
self.assert_equal(rv.data, b'test index')
|
||||
|
||||
@emits_module_deprecation_warning
|
||||
def test_module_static_path_subdomain(self):
|
||||
app = flask.Flask(__name__)
|
||||
app.config['SERVER_NAME'] = 'example.com'
|
||||
from subdomaintestmodule import mod
|
||||
app.register_module(mod)
|
||||
c = app.test_client()
|
||||
rv = c.get('/static/hello.txt', 'http://foo.example.com/')
|
||||
rv.direct_passthrough = False
|
||||
self.assert_equal(rv.data.strip(), b'Hello Subdomain')
|
||||
rv.close()
|
||||
|
||||
def test_subdomain_matching(self):
|
||||
app = flask.Flask(__name__)
|
||||
app.config['SERVER_NAME'] = 'localhost'
|
||||
|
|
@ -1339,28 +1327,6 @@ class SubdomainTestCase(FlaskTestCase):
|
|||
rv = c.get('/', 'http://mitsuhiko.localhost:3000/')
|
||||
self.assert_equal(rv.data, b'index for mitsuhiko')
|
||||
|
||||
@emits_module_deprecation_warning
|
||||
def test_module_subdomain_support(self):
|
||||
app = flask.Flask(__name__)
|
||||
mod = flask.Module(__name__, 'test', subdomain='testing')
|
||||
app.config['SERVER_NAME'] = 'localhost'
|
||||
|
||||
@mod.route('/test')
|
||||
def test():
|
||||
return 'Test'
|
||||
|
||||
@mod.route('/outside', subdomain='xtesting')
|
||||
def bar():
|
||||
return 'Outside'
|
||||
|
||||
app.register_module(mod)
|
||||
|
||||
c = app.test_client()
|
||||
rv = c.get('/test', 'http://testing.localhost/')
|
||||
self.assert_equal(rv.data, b'Test')
|
||||
rv = c.get('/outside', 'http://xtesting.localhost/')
|
||||
self.assert_equal(rv.data, b'Outside')
|
||||
|
||||
def test_multi_route_rules(self):
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue