def install_app(): project = create_project('myproject') app_config = create_app_config(project, 'my_mounted_app') # XXX: Remove project argument to install; it's redundant app = Application(project, app_config) app.install(project) return app
def setUp(self): super(TestWhenAppIsFoundByMountPoint, self).setUp() self.myproject = create_project('myproject') self.app_config = create_app_config(self.myproject, 'my_mounted_app') set_context('myproject', mount_point='my_mounted_app', neighborhood=self.myproject.neighborhood)
def setUp(self): super(TestWhenAppIsFoundByID, self).setUp() self.myproject = create_project('myproject') self.app_config = create_app_config(self.myproject, 'my_mounted_app') set_context('myproject', app_config_id=self.app_config._id, neighborhood=self.myproject.neighborhood)
def fake_app_patch(test_case): project = create_project('myproject') app_config = create_app_config(project, 'my_app') app = Mock() app.__version__ = '0' app.config = app_config app.url = '/-app-/' return patch.object(c, 'app', app, create=True)
def fake_app_patch(test_case): project = create_project("myproject") app_config = create_app_config(project, "my_app") app = Mock() app.__version__ = "0" app.config = app_config app.url = "/-app-/" return patch.object(c, "app", app, create=True)