Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c88a1f8

Browse files
Add failing test for resource name consistency
When setting `resource_name = None`, the related instance's resource name is used in `relationships`, but `None` is used in `included`. This is related to #94 and #124
1 parent bb26764 commit c88a1f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎example/tests/integration/test_model_resource_name.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ def test_type_match_on_included_and_inline_with_serializer_resource_name(self, c
103103

104104
_check_relationship_and_included_comment_type_are_the_same(client, reverse("entry-list"))
105105

106+
def test_type_match_on_included_and_inline_with_serializer_resource_name2(self, client):
107+
serializers.CommentSerializer.Meta.resource_name = None
108+
109+
_check_relationship_and_included_comment_type_are_the_same(client, reverse("entry-list"))
110+
106111
def test_type_match_on_included_and_inline_with_serializer_resource_name_and_JSONAPIMeta(self, client):
107112
models.Comment.__bases__ += (_PatchedModel,)
108113
serializers.CommentSerializer.Meta.resource_name = "resource_name_from_serializer"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /