#NEWLINE# def testAddKey( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'n' ] = Gaffer . Node ( ) #NEWLINE# s [ 'n' ] [ 'user' ] [ 'f' ] = Gaffer . FloatPlug ( flags = ( Gaffer . Plug . Flags . Default | Gaffer . Plug . Flags . Dynamic ) ) #NEWLINE# curve = Gaffer . Animation . acquire ( s [ 'n' ] [ 'user' ] [ 'f' ] ) #NEWLINE# key = Gaffer . Animation . Key ( time = 10 , value = 10 ) #NEWLINE# self . assertFalse ( curve . hasKey ( s . time ) ) #NEWLINE# curve . addKey ( key ) #NEWLINE# self . assertTrue ( curve . hasKey ( key . time ) ) #NEWLINE# self . assertEqual ( curve . getKey ( key . time ) , key )