#NEWLINE# def test_unlock_when_allowed( self ) : #NEWLINE# #INDENT# self . story . lock_for ( self . user ) #NEWLINE# self . story . save ( ) #NEWLINE# res = self . c . get ( self . urls [ 'unlock' ] ) #NEWLINE# self . assertEquals ( res . status_code , 200 ) #NEWLINE# story = testmodels . Story . objects . get ( pk = self . story . id ) #NEWLINE# self . assertFalse ( self . is_locked )