Exemplo n.º 1
0
    def testIt(self):
        settings = {'restricted': True}

        with patch('magmaweb.Configurator', spec=True) as Configurator:

            main({}, **settings)

            Configurator.assert_called_with(settings=settings)
            config = Configurator.return_value
            config.include.assert_called_with('magmaweb.config.configure')
            config.make_wsgi_app.assert_called_with()
Exemplo n.º 2
0
    def testIt(self):
        settings = {'restricted': True}

        with patch('magmaweb.Configurator', spec=True) as Configurator:

            main({}, **settings)

            Configurator.assert_called_with(settings=settings)
            config = Configurator.return_value
            config.include.assert_called_with('magmaweb.config.configure')
            config.make_wsgi_app.assert_called_with()
Exemplo n.º 3
0
 def setUp(self):
     self.root_dir = tempfile.mkdtemp()
     # default settings
     settings = {
         'jobfactory.root_dir': self.root_dir,
         'mako.directories': 'magmaweb:templates',
         'extjsroot': 'ext',
         'sqlalchemy.url': 'sqlite:///:memory:',
         'cookie.secret': 'aepeeV6aizaiph5Ae0Reimeequuluwoh',
         'cookie.path': '/',
         'monitor_user': '******',
     }
     settings.update(self.settings)
     self.settings = settings
     app = main({}, **self.settings)
     self.testapp = TestApp(app)
Exemplo n.º 4
0
 def setUp(self):
     self.root_dir = tempfile.mkdtemp()
     # default settings
     settings = {
         "jobfactory.root_dir": self.root_dir,
         "mako.directories": "magmaweb:templates",
         "extjsroot": "ext",
         "sqlalchemy.url": "sqlite:///:memory:",
         "cookie.secret": "aepeeV6aizaiph5Ae0Reimeequuluwoh",
         "cookie.path": "/",
         "monitor_user": "******",
     }
     settings.update(self.settings)
     self.settings = settings
     app = main({}, **self.settings)
     self.testapp = TestApp(app)