Compare commits

..

No commits in common. "8f1e4ff9d01301c0eb8d9b916a38346ecec8937f" and "78151b3bb313fbbfb89b2389dec520b256486a18" have entirely different histories.

5 changed files with 9 additions and 3 deletions

View File

@ -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]

View File

@ -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()

View File

@ -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)

View File

@ -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

View File

@ -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)