Skip to content
Myr

The testsuite skips JSON tests now is not available and runs the example

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

tests as well.

authored by Armin Ronacher · committed by Armin Ronacher · parent a7ff9db · Browse files · 1 file+22 added−1 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+22 added−1 removed

  • tests:+22 added−1 removed

1 file+22 added−1 removed

modified:tests/flask_tests.py+22 added-1 removed
8 unmodified lines
9 :copyright: (c) 2010 by Armin Ronacher.10 :license: BSD, see LICENSE for more details.11"""12from __future__ import with_statement13import os14import sys15import flask16import unittest17import tempfile181920example_path = os.path.join(os.path.dirname(__file__), '..', 'examples')21sys.path.append(os.path.join(example_path, 'flaskr'))22sys.path.append(os.path.join(example_path, 'minitwit'))232425class ContextTestCase(unittest.TestCase):2627 def test_context_binding(self):28 app = flask.Flask(__name__)
254 unmodified lines
283 macro = flask.get_template_attribute('_macro.html', 'hello')284 assert macro('World') == 'Hello World!'285286287def suite():288 from minitwit_tests import MiniTwitTestCase289 from flaskr_tests import FlaskrTestCase290 suite = unittest.TestSuite()291 suite.addTest(unittest.makeSuite(ContextTestCase))292 suite.addTest(unittest.makeSuite(BasicFunctionalityTestCase))293 suite.addTest(unittest.makeSuite(TemplatingTestCase))294 if flask.json_available:295 suite.addTest(unittest.makeSuite(JSONTestCase))296 suite.addTest(unittest.makeSuite(MiniTwitTestCase))297 suite.addTest(unittest.makeSuite(FlaskrTestCase))298 return suite299300301if __name__ == '__main__':281 unittest.main()302 unittest.main(defaultTest='suite')