[tests/i3bar-input] Add input tests for i3bar protocol

Also, replaced the MockModule with a generic mock object.
This commit is contained in:
Tobi-wan Kenobi 2017-03-05 08:35:15 +01:00
parent cdbddcfff7
commit 70f138b97b
3 changed files with 37 additions and 15 deletions

View file

@ -25,8 +25,10 @@ class TestI3BarInput(unittest.TestCase):
epoll.poll.return_value = [(self.stdin.fileno.return_value, 2)]
self.anyModule = mocks.MockModule()
self.anotherModule = mocks.MockModule()
self.anyModule = mock.Mock()
self.anyModule.id = mocks.rand(10)
self.anotherModule = mock.Mock()
self.anotherModule.id = mocks.rand(10)
self.anyWidget = mocks.MockWidget("some-widget")
self.anotherWidget = mocks.MockWidget("another-widget")
self.anyData = self.invalidData = "any data"