bumblebee-status/tests/modules/test_caffeine.py
Tobi-wan Kenobi 771c597ce9 [modules/caffeine] Re-implement caffeine module
Add caffeine module & add a framework for testing it (no tests yet,
though).

see #23
2016-12-10 15:36:18 +01:00

21 lines
683 B
Python

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