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):
77
77
content_type = 'application/vnd.api+json' )
78
78
assert response .status_code == 400
79
79
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
+
80
92
def test_get_empty_to_one_relationship (self ):
81
93
url = '/comments/{}/relationships/author' .format (self .first_entry .id )
82
94
response = self .client .get (url )
You can’t perform that action at this time.
0 commit comments