From 1539af2a07f5ba78a62fed9f9a4e4a3928b67427 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 27 Mar 2015 22:27:03 -0400 Subject: [PATCH] Fix tests for new redaction --- beets/util/confit.py | 7 +++++-- test/test_config_command.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/beets/util/confit.py b/beets/util/confit.py index 8ba51cd2f..de137107b 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -435,8 +435,11 @@ class RootView(ConfigView): return ((dict(s), s) for s in self.sources) def clear(self): - """Remove all sources from this configuration.""" + """Remove all sources (and redactions) from this + configuration. + """ del self.sources[:] + self.redactions.clear() def root(self): return self @@ -918,7 +921,7 @@ class LazyConfig(Configuration): def clear(self): """Remove all sources from this configuration.""" - del self.sources[:] + super(LazyConfig, self).clear() self._lazy_suffix = [] self._lazy_prefix = [] diff --git a/test/test_config_command.py b/test/test_config_command.py index cd23f8eb2..f1e1b375f 100644 --- a/test/test_config_command.py +++ b/test/test_config_command.py @@ -34,6 +34,7 @@ class ConfigCommandTest(unittest.TestCase, TestHelper): file.write('option: cli overwrite') config.clear() + config['password'].redact = True config._materialized = False def tearDown(self):