Fix tests for new redaction

This commit is contained in:
Adrian Sampson 2015-03-27 22:27:03 -04:00
parent b477f4a53f
commit 1539af2a07
2 changed files with 6 additions and 2 deletions

View file

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

View file

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