2019-05-19 14:22:53 +02:00
|
|
|
from pytest import fixture
|
|
|
|
from .model import Widget
|
|
|
|
from .interface import WidgetInterface
|
|
|
|
|
|
|
|
|
|
|
|
@fixture
|
|
|
|
def interface() -> WidgetInterface:
|
2019-08-03 18:55:38 +02:00
|
|
|
return WidgetInterface(widget_id=1, name="Test widget", purpose="Test purpose")
|
2019-05-19 14:22:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
def test_WidgetInterface_create(interface: WidgetInterface):
|
|
|
|
assert interface
|
|
|
|
|
|
|
|
|
|
|
|
def test_WidgetInterface_works(interface: WidgetInterface):
|
|
|
|
widget = Widget(**interface)
|
|
|
|
assert widget
|