2016-12-04 12:53:18 +01:00
|
|
|
# pylint: disable=C0103,C0111
|
|
|
|
|
2016-12-04 17:45:42 +01:00
|
|
|
from bumblebee.output import Widget
|
|
|
|
|
|
|
|
def assertWidgetAttributes(test, widget):
|
|
|
|
test.assertTrue(isinstance(widget, Widget))
|
|
|
|
test.assertTrue(hasattr(widget, "full_text"))
|
|
|
|
|
|
|
|
class MockOutput(object):
|
|
|
|
def start(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def stop(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def draw(self, widgets, engine):
|
|
|
|
engine.stop()
|
|
|
|
|
|
|
|
def flush(self):
|
|
|
|
pass
|
|
|
|
|
2016-12-04 12:53:18 +01:00
|
|
|
class MockWidget(object):
|
|
|
|
def __init__(self, text):
|
|
|
|
self._text = text
|
|
|
|
|
2016-12-04 17:45:42 +01:00
|
|
|
def full_text(self):
|
2016-12-04 12:53:18 +01:00
|
|
|
return self._text
|
|
|
|
|
|
|
|
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|