def _patch_configdata(monkeypatch, stubs, symbol): """Patch the configdata module to provide fake data.""" data = collections.OrderedDict([ ('general', sections.KeyValue( ('time', value.SettingValue( stubs.FakeConfigType('fast', 'slow'), default='slow'), 'Is an illusion.\n\nLunchtime doubly so.'), ('volume', value.SettingValue(stubs.FakeConfigType('0', '11'), default='11'), 'Goes to 11'))), ('ui', sections.KeyValue( ('gesture', value.SettingValue( stubs.FakeConfigType(('on', 'off')), default='off'), 'Waggle your hands to control qutebrowser'), ('mind', value.SettingValue( stubs.FakeConfigType(('on', 'off')), default='off'), 'Enable mind-control ui (experimental)'), ('voice', value.SettingValue( stubs.FakeConfigType(('on', 'off')), default='off'), 'Whether to respond to voice commands'))), ('searchengines', sections.ValueList( stubs.FakeConfigType(), stubs.FakeConfigType(), ('DEFAULT', 'https://duckduckgo.com/?q={}'), )), ]) monkeypatch.setattr(symbol, data)
sect.KeyValue( ('ignore-case', SettingValue(typ.IgnoreCase(), 'smart'), "Whether to find text on a page case-insensitively."), ('wrap-search', SettingValue(typ.Bool(), 'true'), "Whether to wrap finding text to the top when arriving at the end."), ('startpage', SettingValue(typ.List(), 'https://www.duckduckgo.com'), "The default page(s) to open at the start, separated by commas."), ('auto-search', SettingValue(typ.AutoSearch(), 'naive'), "Whether to start a search when something else than a URL is " "entered."), ('auto-save-config', SettingValue(typ.Bool(), 'true'), "Whether to save the config automatically on quit."), ('editor', SettingValue(typ.ShellCommand(placeholder=True), 'gvim -f "{}"'), "The editor (and arguments) to use for the `open-editor` command.\n\n" "Use `{}` for the filename. The value gets split like in a shell, so " "you can use `\"` or `'` to quote arguments."), ('editor-encoding', SettingValue( typ.Encoding(), 'utf-8'), "Encoding to use for editor."), ('private-browsing', SettingValue(typ.Bool(), 'false'), "Do not record visited pages in the history or store web page " "icons."), ('developer-extras', SettingValue( typ.Bool(), 'false'), "Enable extra tools for Web developers.\n\n" "This needs to be enabled for `:inspector` to work and also adds an " "_Inspect_ entry to the context menu."), ('print-element-backgrounds', SettingValue(typ.Bool(), 'true'), "Whether the background color and images are also drawn when the " "page is printed."), ('xss-auditing', SettingValue(typ.Bool(), 'false'), "Whether load requests should be monitored for cross-site scripting " "attempts.\n\n" "Suspicious scripts will be blocked and reported in the inspector's " "JavaScript console. Enabling this feature might have an impact on " "performance."), ('site-specific-quirks', SettingValue( typ.Bool(), 'true'), "Enable workarounds for broken sites."), ('default-encoding', SettingValue(typ.String(none_ok=True), ''), "Default encoding to use for websites.\n\n" "The encoding must be a string describing an encoding such as " '_utf-8_, _iso-8859-1_, etc. If left empty a default value will be ' "used."), ('new-instance-open-target', SettingValue(typ.NewInstanceOpenTarget(), 'window'), "How to open links in an existing instance if a new one is " "launched."), )),