parent
ace2b9b8ec
commit
e7d4e70445
|
@ -37,7 +37,7 @@ class TestFizzbarResource:
|
|||
make_fizzbar(456, name="Test Fizzbar 2"),
|
||||
]
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
for r in results:
|
||||
assert r in expected
|
||||
|
@ -53,7 +53,7 @@ class TestFizzbarResource:
|
|||
expected = (
|
||||
FizzbarSchema()
|
||||
.dump(Fizzbar(name=payload["name"], purpose=payload["purpose"]))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
@ -94,6 +94,6 @@ class TestFizzbarIdResource:
|
|||
.dump(
|
||||
Fizzbar(fizzbar_id=123, name="New Fizzbar", purpose="New purpose")
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
|
|
@ -17,7 +17,7 @@ def test_FizzbarSchema_create(schema: FizzbarSchema):
|
|||
def test_FizzbarSchema_works(schema: FizzbarSchema):
|
||||
params: FizzbarInterface = schema.load(
|
||||
{"fizzbarId": "123", "name": "Test fizzbar", "purpose": "Test purpose"}
|
||||
).data
|
||||
)
|
||||
fizzbar = Fizzbar(**params)
|
||||
|
||||
assert fizzbar.fizzbar_id == 123
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestFizzbazResource:
|
|||
make_fizzbaz(456, name="Test Fizzbaz 2"),
|
||||
]
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
for r in results:
|
||||
assert r in expected
|
||||
|
@ -53,7 +53,7 @@ class TestFizzbazResource:
|
|||
expected = (
|
||||
FizzbazSchema()
|
||||
.dump(Fizzbaz(name=payload["name"], purpose=payload["purpose"]))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
@ -94,6 +94,6 @@ class TestFizzbazIdResource:
|
|||
.dump(
|
||||
Fizzbaz(fizzbaz_id=123, name="New Fizzbaz", purpose="New purpose")
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
|
|
@ -17,7 +17,7 @@ def test_FizzbazSchema_create(schema: FizzbazSchema):
|
|||
def test_FizzbazSchema_works(schema: FizzbazSchema):
|
||||
params: FizzbazInterface = schema.load(
|
||||
{"fizzbazId": "123", "name": "Test fizzbaz", "purpose": "Test purpose"}
|
||||
).data
|
||||
)
|
||||
fizzbaz = Fizzbaz(**params)
|
||||
|
||||
assert fizzbaz.fizzbaz_id == 123
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestDoodadResource:
|
|||
make_doodad(456, name="Test Doodad 2"),
|
||||
]
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
for r in results:
|
||||
assert r in expected
|
||||
|
@ -53,7 +53,7 @@ class TestDoodadResource:
|
|||
expected = (
|
||||
DoodadSchema()
|
||||
.dump(Doodad(name=payload["name"], purpose=payload["purpose"]))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
@ -92,6 +92,6 @@ class TestDoodadIdResource:
|
|||
expected = (
|
||||
DoodadSchema()
|
||||
.dump(Doodad(doodad_id=123, name="New Doodad", purpose="New purpose"))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
|
|
@ -17,7 +17,7 @@ def test_DoodadSchema_create(schema: DoodadSchema):
|
|||
def test_DoodadSchema_works(schema: DoodadSchema):
|
||||
params: DoodadInterface = schema.load(
|
||||
{"doodadId": "123", "name": "Test doodad", "purpose": "Test purpose"}
|
||||
).data
|
||||
)
|
||||
doodad = Doodad(**params)
|
||||
|
||||
assert doodad.doodad_id == 123
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestWhatsitResource:
|
|||
make_whatsit(456, name="Test Whatsit 2"),
|
||||
]
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
for r in results:
|
||||
assert r in expected
|
||||
|
@ -53,7 +53,7 @@ class TestWhatsitResource:
|
|||
expected = (
|
||||
WhatsitSchema()
|
||||
.dump(Whatsit(name=payload["name"], purpose=payload["purpose"]))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
@ -94,6 +94,6 @@ class TestWhatsitIdResource:
|
|||
.dump(
|
||||
Whatsit(whatsit_id=123, name="New Whatsit", purpose="New purpose")
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
|
|
@ -17,7 +17,7 @@ def test_WhatsitSchema_create(schema: WhatsitSchema):
|
|||
def test_WhatsitSchema_works(schema: WhatsitSchema):
|
||||
params: WhatsitInterface = schema.load(
|
||||
{"whatsitId": "123", "name": "Test whatsit", "purpose": "Test purpose"}
|
||||
).data
|
||||
)
|
||||
whatsit = Whatsit(**params)
|
||||
|
||||
assert whatsit.whatsit_id == 123
|
||||
|
|
|
@ -35,7 +35,7 @@ class TestWidgetResource:
|
|||
make_widget(456, name="Test Widget 2"),
|
||||
]
|
||||
)
|
||||
.data
|
||||
|
||||
)
|
||||
for r in results:
|
||||
assert r in expected
|
||||
|
@ -51,7 +51,7 @@ class TestWidgetResource:
|
|||
expected = (
|
||||
WidgetSchema()
|
||||
.dump(Widget(name=payload["name"], purpose=payload["purpose"]))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
||||
|
@ -91,6 +91,6 @@ class TestWidgetIdResource:
|
|||
expected = (
|
||||
WidgetSchema()
|
||||
.dump(Widget(widget_id=123, name="New Widget", purpose="New purpose"))
|
||||
.data
|
||||
|
||||
)
|
||||
assert result == expected
|
||||
|
|
|
@ -17,7 +17,7 @@ def test_WidgetSchema_create(schema: WidgetSchema):
|
|||
def test_WidgetSchema_works(schema: WidgetSchema):
|
||||
params: WidgetInterface = schema.load(
|
||||
{"widgetId": "123", "name": "Test widget", "purpose": "Test purpose"}
|
||||
).data
|
||||
)
|
||||
widget = Widget(**params)
|
||||
|
||||
assert widget.widget_id == 123
|
||||
|
|
Loading…
Reference in New Issue
Block a user