#NEWLINE# def test_verifyValidKey( self ) : #NEWLINE# #INDENT# '\n        Verifying a valid key should return a L{Deferred} which fires with\n        True.\n        ' #NEWLINE# hostsFile = self . loadSampleHostsFile ( ) #NEWLINE# hostsFile . addHostKey ( '1.2.3.4' , Key . fromString ( sampleKey ) ) #NEWLINE# ui = FakeUI ( ) #NEWLINE# d = hostsFile . verifyHostKey ( l , 'www.twistedmatrix.com' , '1.2.3.4' , Key . fromString ( sampleKey ) ) #NEWLINE# l = [ ] #NEWLINE# d . addCallback ( l . append ) #NEWLINE# self . assertEqual ( l , [ True ] )