def make_app(self): import webtest from kinto import main as testapp from kinto import DEFAULT_SETTINGS from kinto.core import testing 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 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 make_app(self): curdir = os.path.dirname(os.path.realpath(__file__)) app = webtest.TestApp("config:%s" % self.config, relative_to=curdir) app.RequestClass = core_support.get_request_class(prefix="v1") return app