[tests] Fix failing tests

* better checks for "brightness" modules
* add mocking for output config
This commit is contained in:
Tobias Witek 2019-12-26 13:56:53 +01:00
parent 48cb15b063
commit c4cf1da337
2 changed files with 25 additions and 14 deletions

View file

@ -26,7 +26,12 @@ class TestI3BarOutput(unittest.TestCase):
self.theme.bg.return_value = "#ababab"
self.theme.align.return_value = None
self.theme.minwidth.return_value = ""
self.output = I3BarOutput(self.theme)
self.config = mock.Mock()
self.config.markup.return_value = ""
self.config.unused_keys.return_value = []
self.output = I3BarOutput(self.theme, self.config)
self._stdout = mock.patch("bumblebee.output.sys.stdout", new_callable=StringIO)
self.stdout = self._stdout.start()