@@ -95,11 +95,10 @@ def test_blog_create(client):
9595
9696 expected = {
9797 'data' : {
98- 'attributes' : {'name' : blog .name },
98+ 'attributes' : {'name' : blog .name , 'tags' : [] },
9999 'id' : '{}' .format (blog .id ),
100100 'links' : {'self' : 'http://testserver/blogs/{}' .format (blog .id )},
101101 'meta' : {'copyright' : datetime .now ().year },
102- 'relationships' : {'tags' : {'data' : []}},
103102 'type' : 'blogs'
104103 },
105104 'meta' : {'apiDocs' : '/docs/api/blogs' }
@@ -116,11 +115,10 @@ def test_get_object_gives_correct_blog(client, blog, entry):
116115 resp = client .get (url )
117116 expected = {
118117 'data' : {
119- 'attributes' : {'name' : blog .name },
118+ 'attributes' : {'name' : blog .name , 'tags' : [] },
120119 'id' : '{}' .format (blog .id ),
121120 'links' : {'self' : 'http://testserver/blogs/{}' .format (blog .id )},
122121 'meta' : {'copyright' : datetime .now ().year },
123- 'relationships' : {'tags' : {'data' : []}},
124122 'type' : 'blogs'
125123 },
126124 'meta' : {'apiDocs' : '/docs/api/blogs' }
@@ -154,11 +152,10 @@ def test_get_object_patches_correct_blog(client, blog, entry):
154152
155153 expected = {
156154 'data' : {
157- 'attributes' : {'name' : new_name },
155+ 'attributes' : {'name' : new_name , 'tags' : [] },
158156 'id' : '{}' .format (blog .id ),
159157 'links' : {'self' : 'http://testserver/blogs/{}' .format (blog .id )},
160158 'meta' : {'copyright' : datetime .now ().year },
161- 'relationships' : {'tags' : {'data' : []}},
162159 'type' : 'blogs'
163160 },
164161 'meta' : {'apiDocs' : '/docs/api/blogs' }
@@ -189,17 +186,14 @@ def test_get_entry_list_with_blogs(client, entry):
189186 'first' : 'http://testserver/drf-entries/1/suggested/?page%5Bnumber%5D=1' ,
190187 'last' : 'http://testserver/drf-entries/1/suggested/?page%5Bnumber%5D=1' ,
191188 'next' : None ,
192- 'prev' : None
189+ 'prev' : None ,
193190 },
194191 'data' : [
195192 {
196193 'type' : 'entries' ,
197194 'id' : '1' ,
198- 'attributes' : {},
199- 'relationships' : {
200- 'tags' : {
201- 'data' : []
202- }
195+ 'attributes' : {
196+ 'tags' : [],
203197 },
204198 'links' : {
205199 'self' : 'http://testserver/drf-blogs/1'
0 commit comments