def test_create_routes_with_unimplemented_http_method_should_raises_error(self): app = Flask(__name__) from flask_site.helpers import routes_config routes_config['index']['methods'].append('POST') create_routes(app, app_routes=routes_config)
def test_create_routes(self): app = Flask(__name__) create_routes(app) count = 0 for _ in app.url_map.iter_rules(): # Must be looped over, iterator doesn't have len() count += 1 ok_(count > 1, msg='Routes are not implemented')
def test_create_routes_empty_controller_should_raises_error(self): app = Flask(__name__) test_routes = { 'error': { 'uri': '/__error/', 'methods': ['GET'], 'controller': '_ERROR' } } create_routes(app, app_routes=test_routes)
def test_create_routes_empty_should_raises_error(self): app = Flask(__name__) create_routes(app, app_routes=None)