def before_all(context): setup_debug_on_error(context.config.userdata) APP_CONFIGS = ['app.yaml'] python_runtime._RUNTIME_ARGS = [ sys.executable, os.path.join(os.path.dirname(dev_appserver.__file__), '_python_runtime.py') ] context.oauth_http = oauth2_authenticate("behave/1.0", "behave test") options = devappserver2.PARSER.parse_args([ '--admin_port', '0', '--port', '8123', '--datastore_path', ':memory:', '--logs_path', ':memory:', '--skip_sdk_update_check', '--', ] + APP_CONFIGS) context.server = devappserver2.DevelopmentServer() context.server.start(options) context.request_args = None
def setUp(self): APP_CONFIGS = ['app.yaml'] python_runtime._RUNTIME_ARGS = [ sys.executable, os.path.join(os.path.dirname(dev_appserver.__file__), '_python_runtime.py') ] self.oauth_http = oauth2_authenticate(self.USER_AGENT, self.OAUTH_DISPLAY_NAME) if self.server is None: options = devappserver2.PARSER.parse_args([ '--admin_port', '0', '--port', '8123', '--datastore_path', ':memory:', '--logs_path', ':memory:', '--skip_sdk_update_check', '--', ] + APP_CONFIGS) server = devappserver2.DevelopmentServer() server.start(options) self.server = server