#NEWLINE# def test_when_project_is_locked( self ) : #NEWLINE# #INDENT# self . project . islocked = True #NEWLINE# self . project . save ( ) #NEWLINE# response = self . put ( self . admin , { #NEWLINE# #INDENT# 'can_contribute' : False , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_400_BAD_REQUEST ) #NEWLINE# self . assertTrue ( Group . objects . get ( pk = self . contributors . id ) . can_contribute )