#NEWLINE# def test_409_on_hash_instead_of_array_provided( comment , post , client ) : #NEWLINE# #INDENT# payload = { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'type' : 'blog-comments' , #NEWLINE# 'id' : str ( comment . id ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# client . post ( '/api/blog-posts/{}/relationships/comments/' . format ( post . id ) , data = json . dumps ( payload ) , content_type = 'application/vnd.api+json' ) . validate ( 409 , ValidationError )