def test_0010_make_app_wo_db(self): """ Build a simple app to test w/o DB """ with self.assertRaises(InvalidRequestError): app = make_app(installed_apps=[ 'monstor.contrib.auth', ])
def test_0020_make_app(self): """ Build a simple app to test """ from tornado.options import options options.database = 'test_db' app = make_app(installed_apps=[ 'monstor.contrib.auth', ])
def get_app(self): options.options.database = 'test_tickets' SETTINGS['xsrf_cookies'] = False SETTINGS['installed_apps'] = [ 'monstor.contrib.auth', 'tickets.ticket', __name__, ] application = make_app(**SETTINGS) return application
def get_app(self): options.options.database = 'test_signal' settings = { 'installed_apps': [ 'monstor.contrib.auth', __name__, ], 'template_path': os.path.join( os.path.dirname(__file__), "templates" ), 'login_url': '/login', 'xsrf_cookies': False, 'cookie_secret': 'nbgdhfjvgdfglkjdfkgjdfi', } application = make_app(**settings) return application
def get_app(self): options.options.database = 'test_monstor_registration' settings = { 'installed_apps': [ 'monstor.contrib.auth', __name__, ], 'template_path': os.path.join( os.path.dirname(__file__), "templates" ), 'login_url': '/login', 'xsrf_cookies': False, 'cookie_secret': 'something-supposed-2-b-random', } application = make_app(**settings) return application
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from tornado import ioloop from tornado.options import options from monstor.app import make_app settings = { 'installed_apps': [ 'icecat', ], 'cookie_secret': 'V9AiQHufNTdLSmPK', 'template_path': os.path.join(os.getcwd(), 'templates') } application = make_app(**settings) if __name__ == '__main__': application.listen(options.port, address=options.address) ioloop.IOLoop.instance().start()
def get_app(self): options.options.database = 'test_project' SETTINGS['xsrf_cookies'] = False application = make_app(**SETTINGS) return application