[tests/brightness] Create open call, if it does not exist
Hopefully, this fixes the failing Travis build.
This commit is contained in:
parent
62f60a172f
commit
fd7c5f6f0b
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ class TestBrightnessModule(unittest.TestCase):
|
||||||
self.assertEquals(self.module.brightness(self.anyWidget), "020%")
|
self.assertEquals(self.module.brightness(self.anyWidget), "020%")
|
||||||
self.assertEquals(len(self.module.brightness(self.anyWidget)), len("100%"))
|
self.assertEquals(len(self.module.brightness(self.anyWidget)), len("100%"))
|
||||||
|
|
||||||
@mock.patch('bumblebee.modules.brightness.open')
|
@mock.patch('bumblebee.modules.brightness.open', create=True)
|
||||||
def test_error(self,mock_open):
|
def test_error(self,mock_open):
|
||||||
mock_open.side_effect = FileNotFoundError
|
mock_open.side_effect = FileNotFoundError
|
||||||
self.module.update_all()
|
self.module.update_all()
|
||||||
|
|
Loading…
Reference in a new issue