#NEWLINE# def test_409_on_incompatible_model( user , post , client ) : #NEWLINE# #INDENT# payload = { #NEWLINE# #INDENT# 'data' : [ { #NEWLINE# #INDENT# 'type' : 'users' , #NEWLINE# 'id' : str ( user . 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 )