e7d4e70445
Fixes #3
26 lines
614 B
Python
26 lines
614 B
Python
from pytest import fixture
|
|
|
|
from .model import Fizzbar
|
|
from .schema import FizzbarSchema
|
|
from .interface import FizzbarInterface
|
|
|
|
|
|
@fixture
|
|
def schema() -> FizzbarSchema:
|
|
return FizzbarSchema()
|
|
|
|
|
|
def test_FizzbarSchema_create(schema: FizzbarSchema):
|
|
assert schema
|
|
|
|
|
|
def test_FizzbarSchema_works(schema: FizzbarSchema):
|
|
params: FizzbarInterface = schema.load(
|
|
{"fizzbarId": "123", "name": "Test fizzbar", "purpose": "Test purpose"}
|
|
)
|
|
fizzbar = Fizzbar(**params)
|
|
|
|
assert fizzbar.fizzbar_id == 123
|
|
assert fizzbar.name == "Test fizzbar"
|
|
assert fizzbar.purpose == "Test purpose"
|