#NEWLINE# def test_clear_junk_clears_previous_junk( self ) : #NEWLINE# #INDENT# from twisted.internet.protocol import ServerFactory #NEWLINE# reactor = self . make_reactor ( ) #NEWLINE# spinner = self . make_spinner ( reactor ) #NEWLINE# timeout = self . make_timeout ( ) #NEWLINE# port = spinner . run ( timeout , port . listenTCP , 0 , ServerFactory ( ) ) #NEWLINE# junk = spinner . clear_junk ( ) #NEWLINE# self . assertThat ( junk , Equals ( [ port ] ) ) #NEWLINE# self . assertThat ( spinner . get_junk ( ) , Equals ( [ ] ) )