def make_app(self): import webtest from kinto import main as testapp from kinto import DEFAULT_SETTINGS from kinto.tests.core import support as core_support settings = core_support.DEFAULT_SETTINGS.copy() settings.update(**DEFAULT_SETTINGS) settings['storage_backend'] = 'kinto.core.storage.memory' settings['permission_backend'] = 'kinto.core.permission.memory' settings['userid_hmac_secret'] = "this is not a secret" settings['includes'] = "kinto_attachment" settings['kinto.attachment.base_path'] = "/tmp" settings['kinto.attachment.base_url'] = "" settings['kinto.attachment.keep_old_files'] = "true" app = webtest.TestApp(testapp({}, **settings)) app.RequestClass = core_support.get_request_class(prefix="v1") return app
def make_app(self): import webtest from kinto import main as testapp from kinto import DEFAULT_SETTINGS from cliquet.tests import support as cliquet_support settings = cliquet_support.DEFAULT_SETTINGS.copy() settings.update(**DEFAULT_SETTINGS) settings['storage_backend'] = 'cliquet.storage.memory' settings['permission_backend'] = 'cliquet.permission.memory' settings['userid_hmac_secret'] = "this is not a secret" settings['includes'] = "kinto_attachment" settings['kinto.attachment.base_path'] = "/tmp" settings['kinto.attachment.base_url'] = "" settings['kinto.attachment.keep_old_files'] = "true" app = webtest.TestApp(testapp({}, **settings)) app.RequestClass = cliquet_support.get_request_class(prefix="v1") return app
def make_app(self): import webtest from kinto import main as testapp from kinto import DEFAULT_SETTINGS try: from kinto.core import testing as core_support except ImportError: # Pragma: no cover # Fallback for Kinto < 4.1.0 from kinto.tests.core import support as core_support settings = core_support.DEFAULT_SETTINGS.copy() settings.update(**DEFAULT_SETTINGS) settings['storage_backend'] = 'kinto.core.storage.memory' settings['permission_backend'] = 'kinto.core.permission.memory' settings['userid_hmac_secret'] = "this is not a secret" settings['includes'] = "kinto_attachment" settings['kinto.attachment.base_path'] = "/tmp" settings['kinto.attachment.base_url'] = "" settings['kinto.attachment.keep_old_files'] = "true" app = webtest.TestApp(testapp({}, **settings)) app.RequestClass = core_support.get_request_class(prefix="v1") return app
def _get_test_app(self, settings=None): app = webtest.TestApp(testapp({}, **self.get_app_settings(settings))) app.RequestClass = cliquet_support.get_request_class(prefix="v1") return app