Skip to content

Commit 01afd7d

Browse files
committed
fix tests
1 parent e05c245 commit 01afd7d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_api/test_api_sqla_with_includes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def _build_app_custom(self, schema, schema_in_post, model, resource_type: str =
834834
class_detail=DetailViewBaseGeneric,
835835
class_list=ListViewBaseGeneric,
836836
schema=schema,
837-
resource_type="misc",
837+
resource_type=resource_type,
838838
schema_in_patch=UserPatchSchema,
839839
schema_in_post=schema_in_post,
840840
model=model,
@@ -908,6 +908,7 @@ async def test_create_with_relationship_to_the_same_table(self):
908908
SelfRelationshipSchema,
909909
SelfRelationshipSchema,
910910
SelfRelationship,
911+
resource_type="self_relationship",
911912
)
912913

913914
async with AsyncClient(app=app, base_url="http://test") as client:
@@ -931,7 +932,6 @@ async def test_create_with_relationship_to_the_same_table(self):
931932
"name": "parent",
932933
},
933934
"id": parent_object_id,
934-
"relationships": None,
935935
"type": "self_relationship",
936936
},
937937
"jsonapi": {"version": "1.0"},
@@ -1127,7 +1127,7 @@ async def test_fail_to_bind_relationship_with_constraint(
11271127
},
11281128
}
11291129

1130-
res = await client.patch(f"/user-bio/{user_1.id}?include=user", json=patch_user_bio_body)
1130+
res = await client.patch(f"/user-bio/{user_1_bio.id}?include=user", json=patch_user_bio_body)
11311131
assert res.status_code == status.HTTP_500_INTERNAL_SERVER_ERROR, res.text
11321132
assert res.json() == {
11331133
"errors": [

0 commit comments

Comments
 (0)