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