本文整理汇总了Python中stomp.__main__.StompCLI类的典型用法代码示例。如果您正苦于以下问题:Python StompCLI类的具体用法?Python StompCLI怎么用?Python StompCLI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StompCLI类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: testsendfile
def testsendfile(self):
stdin = TestStdin()
stdout = TestStdout(self)
stdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin, stdout)
time.sleep(3)
cli.onecmd('sendfile /queue/testsendfile stomp/test/test.txt')
time.sleep(3)
cli.onecmd('quit')
开发者ID:rafaduran,项目名称:stomp.py,代码行数:14,代码来源:cli_test.py
示例2: testrunarg
def testrunarg(self):
stdin = TestStdin()
stdout = TestStdout(self)
stdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin, stdout)
time.sleep(3)
stdout.expect('Subscribing to "/queue/testfile" with acknowledge set to "auto", id set to "1"')
stdout.expect('this is a test')
stdout.expect('MESSAGE')
stdout.expect('Unsubscribing from "/queue/testfile"')
cli.do_run('stomp/test/test.txt')
开发者ID:rafaduran,项目名称:stomp.py,代码行数:15,代码来源:cli_test.py
示例3: testsendrec
def testsendrec(self):
stdin = TestStdin()
stdout = TestStdout(self)
stdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin, stdout)
time.sleep(3)
stdout.expect('RECEIPT')
cli.onecmd('sendrec /queue/testsendrec this is a test')
time.sleep(3)
cli.onecmd('quit')
开发者ID:rafaduran,项目名称:stomp.py,代码行数:16,代码来源:cli_test.py
示例4: testrun
def testrun(self):
teststdin = TestStdin()
teststdout = TestStdout(self)
teststdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin=teststdin, stdout=teststdout)
time.sleep(3)
teststdout.expect('Subscribing to "/queue/testfile" with acknowledge set to "auto", id set to "1"')
teststdout.expect('this is a test')
teststdout.expect('MESSAGE')
teststdout.expect('Unsubscribing from "/queue/testfile"')
cli.onecmd('run stomp/test/test.txt')
teststdout.expect('Shutting down, please wait')
cli.onecmd('quit')
开发者ID:Anthchirp,项目名称:stomp.py,代码行数:16,代码来源:cli_test.py
示例5: testsendfile
def testsendfile(self):
f = create_test_file()
teststdin = TestStdin()
teststdout = TestStdout(self)
teststdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin=teststdin, stdout=teststdout)
time.sleep(3)
cli.onecmd('sendfile /queue/testsendfile %s' % f.name)
time.sleep(3)
teststdout.expect('Shutting down, please wait')
cli.onecmd('quit')
开发者ID:GeneralizedLearningUtilities,项目名称:SuperGLU,代码行数:17,代码来源:cli_test.py
示例6: testsubscribe
def testsubscribe(self):
stdin = TestStdin()
stdout = TestStdout(self)
stdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin, stdout)
time.sleep(3)
stdout.expect('Subscribing to "/queue/testsubscribe" with acknowledge set to "auto", id set to "1"')
cli.onecmd('subscribe /queue/testsubscribe')
stdout.expect('MESSAGE')
stdout.expect('this is a test')
cli.onecmd('send /queue/testsubscribe this is a test')
time.sleep(3)
stdout.expect('Unsubscribing from "/queue/testsubscribe"')
cli.onecmd('unsubscribe /queue/testsubscribe')
cli.onecmd('quit')
开发者ID:rafaduran,项目名称:stomp.py,代码行数:20,代码来源:cli_test.py
示例7: testssl
def testssl(self):
teststdin = TestStdin()
teststdout = TestStdout(self)
teststdout.expect('CONNECTED')
cli = StompCLI(sslhost, sslport, username, password, '1.0', use_ssl=True, stdin=teststdin, stdout=teststdout)
time.sleep(3)
teststdout.expect('Subscribing to "/queue/testsubscribe" with acknowledge set to "auto", id set to "1"')
cli.onecmd('subscribe /queue/testsubscribe')
teststdout.expect('MESSAGE')
teststdout.expect('this is a test')
cli.onecmd('send /queue/testsubscribe this is a test')
time.sleep(3)
teststdout.expect('Unsubscribing from "/queue/testsubscribe"')
cli.onecmd('unsubscribe /queue/testsubscribe')
teststdout.expect('Shutting down, please wait')
cli.onecmd('quit')
开发者ID:GeneralizedLearningUtilities,项目名称:SuperGLU,代码行数:21,代码来源:cli_ssl_test.py
示例8: teststats
def teststats(self):
stdin = TestStdin()
stdout = TestStdout(self)
stdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, 1.0, stdin, stdout)
time.sleep(3)
stdout.expect('Subscribing to "/queue/teststats" with acknowledge set to "auto", id set to "1"')
cli.onecmd('subscribe /queue/teststats')
stdout.expect('.*No stats available.*')
cli.onecmd('stats')
time.sleep(1)
cli.onecmd('stats on')
cli.onecmd('send /queue/teststats this is a test')
stdout.expect('MESSAGE')
stdout.expect('this is a test')
time.sleep(3)
cli.onecmd('stats')
stdout.expect('Unsubscribing from "/queue/teststats"')
cli.onecmd('unsubscribe /queue/teststats')
cli.onecmd('quit')
开发者ID:artilect,项目名称:stomp.py,代码行数:30,代码来源:cli_test.py
示例9: testabort
def testabort(self):
teststdin = TestStdin()
teststdout = TestStdout(self)
teststdout.expect('CONNECTED')
cli = StompCLI(host, port, username, password, '1.0', stdin=teststdin, stdout=teststdout)
time.sleep(3)
teststdout.expect('Subscribing to "/queue/testabort" with acknowledge set to "auto", id set to "1"')
cli.onecmd('subscribe /queue/testabort')
cli.onecmd('begin')
cli.onecmd('send /queue/testabort this is a test')
cli.onecmd('abort')
time.sleep(3)
teststdout.expect('Unsubscribing from "/queue/testabort"')
cli.onecmd('unsubscribe /queue/testabort')
teststdout.expect('Shutting down, please wait')
cli.onecmd('quit')
开发者ID:GeneralizedLearningUtilities,项目名称:SuperGLU,代码行数:22,代码来源:cli_test.py
注:本文中的stomp.__main__.StompCLI类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论