#NEWLINE# def test_create_project_invalid_title( self ) : #NEWLINE# #INDENT# project = { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'type' : 'collections' , #NEWLINE# 'attributes' : { #NEWLINE# #INDENT# 'title' : ( 'A' * 201 ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# res = self . app . post_json_api ( self . url , project , auth = self . user_one . auth , expect_errors = True ) #NEWLINE# assert_equal ( res . status_code , 400 ) #NEWLINE# assert_equal ( res . json [ 'errors' ] [ 0 ] [ 'detail' ] , 'Title cannot exceed 200 characters.' )