CICD/app/widget/interface_test.py
2019-05-19 08:22:53 -04:00

20 lines
434 B
Python

from pytest import fixture
from .model import Widget
from .interface import WidgetInterface
@fixture
def interface() -> WidgetInterface:
return WidgetInterface(
widget_id=1, name='Test widget', purpose='Test purpose'
)
def test_WidgetInterface_create(interface: WidgetInterface):
assert interface
def test_WidgetInterface_works(interface: WidgetInterface):
widget = Widget(**interface)
assert widget