File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,18 @@ def test_patch_invalid_entry_relationship_blog_returns_400(self):
7777 content_type = 'application/vnd.api+json' )
7878 assert response .status_code == 400
7979
80+ def test_relationship_view_errors_format (self ):
81+ url = '/entries/{}/relationships/blog' .format (self .first_entry .id )
82+ response = self .client .patch (url ,
83+ data = json .dumps ({'data' : {'invalid' : '' }}),
84+ content_type = 'application/vnd.api+json' )
85+ assert response .status_code == 400
86+
87+ result = json .loads (response .content .decode ('utf-8' ))
88+
89+ assert 'data' not in result
90+ assert 'errors' in result
91+
8092 def test_get_empty_to_one_relationship (self ):
8193 url = '/comments/{}/relationships/author' .format (self .first_entry .id )
8294 response = self .client .get (url )
You can’t perform that action at this time.
0 commit comments