'A WebSocketApp should keep running as long as its self.keep_running
is not False (in the boolean context).'

@unittest.skipUnless(TEST_WITH_INTERNET, 'Internet-requiring    tests    are    disabled')
def testKeepRunning(self):

    def on_open(self, *args, **kwargs):
        '    Set    the    keep_running    flag    for    later    inspection    and    immediately\n                                                close    the    connection.\n                                                '
        WebSocketAppTest.keep_running_open = self.keep_running
        self.close()
    def on_close(self, *args, **kwargs):
        '    Set    the    keep_running    flag    for    the    test    to    use.\n                                                '
        WebSocketAppTest.keep_running_close = self.keep_running
    app = ws.WebSocketApp('ws://echo.websocket.org/', on_open=on_open, on_close=on_close)
    app.run_forever()
    self.assertFalse(isinstance(WebSocketAppTest.keep_running_open, WebSocketAppTest.NotSetYet))
    self.assertFalse(isinstance(WebSocketAppTest.keep_running_close, WebSocketAppTest.NotSetYet))
    self.assertEqual(True, WebSocketAppTest.keep_running_open)
    self.assertEqual(False, WebSocketAppTest.keep_running_close)
