Browse Source

Remove flask superclass

pull/1165/head
Markus Unterwaditzer 10 years ago
parent
commit
af4cb0ff2b
  1. 21
      tests/__init__.py
  2. 2
      tests/test_appctx.py
  3. 2
      tests/test_basic.py
  4. 2
      tests/test_blueprints.py
  5. 2
      tests/test_config.py
  6. 2
      tests/test_deprecations.py
  7. 2
      tests/test_ext.py
  8. 2
      tests/test_helpers.py
  9. 2
      tests/test_regression.py
  10. 2
      tests/test_reqctx.py
  11. 2
      tests/test_signals.py
  12. 2
      tests/test_subclassing.py
  13. 2
      tests/test_templating.py
  14. 2
      tests/test_testing.py
  15. 2
      tests/test_views.py

21
tests/__init__.py

@ -11,11 +11,9 @@
"""
from __future__ import print_function
import pytest
import os
import sys
import flask
import warnings
from functools import update_wrapper
from contextlib import contextmanager
@ -82,22 +80,3 @@ def emits_module_deprecation_warning(f):
for entry in log:
assert 'Modules are deprecated' in str(entry['message'])
return update_wrapper(new_f, f)
class TestFlask(object):
"""Baseclass for all the tests that Flask uses. Use these methods
for testing instead of the camelcased ones in the baseclass for
consistency.
"""
def setup_method(self, method):
self.setup()
def teardown_method(self, method):
self.teardown()
def setup(self):
pass
def teardown(self):
pass

2
tests/test_appctx.py

@ -13,7 +13,7 @@ import pytest
import flask
import unittest
from tests import TestFlask
def test_basic_url_generation():

2
tests/test_basic.py

@ -19,7 +19,7 @@ import pickle
import unittest
from datetime import datetime
from threading import Thread
from tests import TestFlask, emits_module_deprecation_warning
from tests import emits_module_deprecation_warning
from flask._compat import text_type
from werkzeug.exceptions import BadRequest, NotFound, Forbidden
from werkzeug.http import parse_date

2
tests/test_blueprints.py

@ -13,7 +13,7 @@ import pytest
import flask
import unittest
from tests import TestFlask
from flask._compat import text_type
from werkzeug.http import parse_cache_control_header
from jinja2 import TemplateNotFound

2
tests/test_config.py

@ -18,7 +18,7 @@ import pkgutil
import unittest
import textwrap
from contextlib import contextmanager
from tests import TestFlask
from flask._compat import PY2

2
tests/test_deprecations.py

@ -11,4 +11,4 @@
import flask
import unittest
from tests import TestFlask, catch_warnings
from tests import catch_warnings

2
tests/test_ext.py

@ -17,7 +17,7 @@ try:
from imp import reload as reload_module
except ImportError:
reload_module = reload
from tests import TestFlask
from flask._compat import PY2

2
tests/test_helpers.py

@ -15,7 +15,7 @@ import os
import flask
import unittest
from logging import StreamHandler
from tests import TestFlask, catch_warnings, catch_stderr
from tests import catch_warnings, catch_stderr
from werkzeug.http import parse_cache_control_header, parse_options_header
from flask._compat import StringIO, text_type

2
tests/test_regression.py

@ -17,7 +17,7 @@ import sys
import flask
import threading
from werkzeug.exceptions import NotFound
from tests import TestFlask
_gc_lock = threading.Lock()

2
tests/test_reqctx.py

@ -17,7 +17,7 @@ try:
from greenlet import greenlet
except ImportError:
greenlet = None
from tests import TestFlask
def test_teardown_on_pop():

2
tests/test_signals.py

@ -17,7 +17,7 @@ except ImportError:
blinker = None
import flask
from tests import TestFlask
pytestmark = pytest.mark.skipif(

2
tests/test_subclassing.py

@ -12,7 +12,7 @@
import flask
import unittest
from logging import StreamHandler
from tests import TestFlask
from flask._compat import StringIO

2
tests/test_templating.py

@ -16,7 +16,7 @@ import unittest
import logging
from jinja2 import TemplateNotFound
from tests import TestFlask
def test_context_processing():

2
tests/test_testing.py

@ -12,7 +12,7 @@ import pytest
import flask
import unittest
from tests import TestFlask
from flask._compat import text_type

2
tests/test_views.py

@ -14,7 +14,7 @@ import pytest
import flask
import flask.views
import unittest
from tests import TestFlask
from werkzeug.http import parse_set_header
def common_test(app):

Loading…
Cancel
Save