Example #1
0
 def test_cmd_quit(self):
     """
     Should be able to quit
     """
     called = []
     
     class FakeTransport:
         def loseConnection(self):
             called.append(True)
     
     s = ShellProtocol()
     s.transport = FakeTransport()
     
     s.cmd_quit()
     self.assertEqual(called, [True])