Example #1
0
 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',
         ])
Example #2
0
 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
Example #4
0
 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
Example #5
0
    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
Example #6
0
#!/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()
Example #7
0
#!/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()
Example #8
0
 def get_app(self):
     options.options.database = 'test_project'
     SETTINGS['xsrf_cookies'] = False
     application = make_app(**SETTINGS)
     return application