Remove flask superclass
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parent af41dbe · Browse files · 15 files·+14 added−35 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
15 files+14 added−35 removed
- tests:+14 added−35 removed
Provenance
- Commit
af4cb0f- Tree
d457a54- Author
Markus Unterwaditzer <markus@unterwaditzer.net>- Committer
Markus Unterwaditzer <markus@unterwaditzer.net>- Parent
af41dbe
15 files changed+14 added−35 removed
modified:tests/__init__.py-21 removed
9 unmodified lines10 :license: BSD, see LICENSE for more details.11 """12 13 from __future__ import print_function14-import pytest14 15 import os16 import sys18-import flask17 import warnings18 from functools import update_wrapper19 from contextlib import contextmanager20 from flask._compat import StringIO58 unmodified lines79 assert log, 'expected deprecation warning'80 for entry in log:81 assert 'Modules are deprecated' in str(entry['message'])82 return update_wrapper(new_f, f)85-86-87-class TestFlask(object):88- """Baseclass for all the tests that Flask uses. Use these methods89- for testing instead of the camelcased ones in the baseclass for90- consistency.91- """92-93- def setup_method(self, method):94- self.setup()95-96- def teardown_method(self, method):97- self.teardown()98-99- def setup(self):100- pass101-102- def teardown(self):103- passmodified:tests/test_appctx.py+1 added-1 removed
11 unmodified lines12 import pytest13 14 import flask15 import unittest16-from tests import TestFlask16 17 18+19 def test_basic_url_generation():20 app = flask.Flask(__name__)21 app.config['SERVER_NAME'] = 'localhost'22 app.config['PREFERRED_URL_SCHEME'] = 'https'91 unmodified linesmodified:tests/test_basic.py+1 added-1 removed
17 unmodified lines18 import pickle19 import unittest20 from datetime import datetime21 from threading import Thread22-from tests import TestFlask, emits_module_deprecation_warning22+from tests import emits_module_deprecation_warning23 from flask._compat import text_type24 from werkzeug.exceptions import BadRequest, NotFound, Forbidden25 from werkzeug.http import parse_date26 from werkzeug.routing import BuildError1340 unmodified linesmodified:tests/test_blueprints.py+1 added-1 removed
11 unmodified lines12 import pytest13 14 import flask15 import unittest16-from tests import TestFlask16+17 from flask._compat import text_type18 from werkzeug.http import parse_cache_control_header19 from jinja2 import TemplateNotFound20 558 unmodified linesmodified:tests/test_config.py+1 added-1 removed
16 unmodified lines17 import pkgutil18 import unittest19 import textwrap20 from contextlib import contextmanager21-from tests import TestFlask21+22 from flask._compat import PY223 24 25 # config keys used for the TestConfig266 unmodified linesmodified:tests/test_deprecations.py+1 added-1 removed
9 unmodified lines10 """11 12 import flask13 import unittest14-from tests import TestFlask, catch_warnings14+from tests import catch_warningsmodified:tests/test_ext.py+1 added-1 removed
15 unmodified lines16 try:17 from imp import reload as reload_module18 except ImportError:19 reload_module = reload20-from tests import TestFlask20+21 from flask._compat import PY222 23 24 @pytest.fixture(autouse=True)113 unmodified linesmodified:tests/test_helpers.py+1 added-1 removed
13 unmodified lines14 import os15 import flask16 import unittest17 from logging import StreamHandler18-from tests import TestFlask, catch_warnings, catch_stderr18+from tests import catch_warnings, catch_stderr19 from werkzeug.http import parse_cache_control_header, parse_options_header20 from flask._compat import StringIO, text_type21 22 621 unmodified linesmodified:tests/test_regression.py+1 added-1 removed
15 unmodified lines16 import sys17 import flask18 import threading19 from werkzeug.exceptions import NotFound20-from tests import TestFlask20 21 22+23 _gc_lock = threading.Lock()24 25 26 class _NoLeakAsserter(object):89 unmodified linesmodified:tests/test_reqctx.py+1 added-1 removed
15 unmodified lines16 try:17 from greenlet import greenlet18 except ImportError:19 greenlet = None20-from tests import TestFlask20 21 22+23 def test_teardown_on_pop():24 buffer = []25 app = flask.Flask(__name__)26 @app.teardown_request159 unmodified linesmodified:tests/test_signals.py+1 added-1 removed
15 unmodified lines16 except ImportError:17 blinker = None18 19 import flask20-from tests import TestFlask20 21 22+23 pytestmark = pytest.mark.skipif(24 blinker is None,25 reason='Signals require the blinker library.'26 )132 unmodified linesmodified:tests/test_subclassing.py+1 added-1 removed
10 unmodified lines11 """12 import flask13 import unittest14 from logging import StreamHandler15-from tests import TestFlask15+16 from flask._compat import StringIO17 18 19 def test_suppressed_exception_logging():19 unmodified linesmodified:tests/test_templating.py+1 added-1 removed
14 unmodified lines15 import unittest16 import logging17 from jinja2 import TemplateNotFound18 19-from tests import TestFlask19 20 21+22 def test_context_processing():23 app = flask.Flask(__name__)24 @app.context_processor25 def context_processor():317 unmodified linesmodified:tests/test_testing.py+1 added-1 removed
10 unmodified lines11 import pytest12 13 import flask14 import unittest15-from tests import TestFlask15+16 from flask._compat import text_type17 18 19 class TestTestTools(object):238 unmodified linesmodified:tests/test_views.py+1 added-1 removed
12 unmodified lines13 14 import flask15 import flask.views16 import unittest17-from tests import TestFlask17+18 from werkzeug.http import parse_set_header19 20 def common_test(app):21 c = app.test_client()142 unmodified lines