[modules/caffeine] Re-implement caffeine module
Add caffeine module & add a framework for testing it (no tests yet, though). see #23
This commit is contained in:
parent
163419063d
commit
771c597ce9
4 changed files with 80 additions and 3 deletions
21
tests/modules/test_caffeine.py
Normal file
21
tests/modules/test_caffeine.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# pylint: disable=C0103,C0111
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import mock
|
||||
|
||||
import bumblebee.input
|
||||
from bumblebee.input import I3BarInput
|
||||
from bumblebee.modules.caffeine import Module
|
||||
from tests.util import MockEngine, MockConfig, assertPopen
|
||||
|
||||
class TestCaffeineModule(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.engine = MockEngine()
|
||||
self.engine.input = I3BarInput()
|
||||
self.engine.input.need_event = True
|
||||
self.engine.input.need_valid_event = True
|
||||
self.config = MockConfig()
|
||||
self.module = Module(engine=self.engine, config={ "config": self.config })
|
||||
for widget in self.module.widgets():
|
||||
widget.link_module(self.module)
|
Loading…
Add table
Add a link
Reference in a new issue