mirror of
https://github.com/aclist/dztui.git
synced 2026-08-30 11:47:17 +02:00
Compare commits
No commits in common. "8f1e4ff9d01301c0eb8d9b916a38346ecec8937f" and "78151b3bb313fbbfb89b2389dec520b256486a18" have entirely different histories.
8f1e4ff9d0
...
78151b3bb3
@ -3,6 +3,7 @@ import re
|
||||
from typing import Literal
|
||||
|
||||
api_filter = r"(.*&key=)([^&]*)(.*)"
|
||||
# FIXME: handle whitespace after directory name ($HOME root)
|
||||
home_filter = r"(/home/)([^\s'\/]*)(.*)"
|
||||
REDACTED = r"\1REDACTED\3"
|
||||
REDACTION_PATTERNS = [api_filter, home_filter]
|
||||
|
||||
@ -288,7 +288,6 @@ class Options(Gtk.Box):
|
||||
|
||||
def _on_api_change_failed(self, emitter: "Emitter") -> None:
|
||||
self.old_entry.set_text(self.old_text)
|
||||
# TODO: use popover
|
||||
dialog = ExceptionDialog(self.controller, errors.api_validation_error)
|
||||
dialog.run()
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ def state_files():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def xdg_paths(monkeypatch):
|
||||
def xdg_paths():
|
||||
routes = {
|
||||
"XDG_CONFIG_HOME": "",
|
||||
"XDG_STATE_HOME": "",
|
||||
@ -37,7 +37,7 @@ def xdg_paths(monkeypatch):
|
||||
tmp = tempfile.TemporaryDirectory(delete=False)
|
||||
routes[route] = tmp.name
|
||||
for k, v in routes.items():
|
||||
monkeypatch.setenv(k, v)
|
||||
os.environ[k] = v
|
||||
env = get_xdg_paths()
|
||||
return parse_filepaths(env)
|
||||
|
||||
|
||||
@ -95,3 +95,8 @@ def test_missing_values(unset_values):
|
||||
j = convert.rc2json(unset_values)
|
||||
j = json.loads(j)
|
||||
assert j.keys() == config_boilerplate.keys()
|
||||
|
||||
|
||||
|
||||
|
||||
# TODO: test that when a config file is created from scratch, it contains all values
|
||||
|
||||
@ -20,6 +20,7 @@ def test_steam(config):
|
||||
key = config["steam_api"]
|
||||
assert probe.test_steam_api(key)
|
||||
|
||||
|
||||
def test_bm(config):
|
||||
key = config["bm_api"]
|
||||
assert probe.test_bm_api(key)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user