Example #1
0
    def testrunarg(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)

        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.do_run(f.name)

        teststdout.expect('Shutting down, please wait')
        cli.onecmd('quit')
Example #2
0
    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')
Example #3
0
    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')
    def testrunarg(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)

        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.do_run(f.name)

        teststdout.expect('Shutting down, please wait')
        cli.onecmd('quit')
Example #5
0
    def testrunarg(self):
        f = create_test_file()

        teststdin = StubStdin()
        teststdout = StubStdout(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.do_run(f.name)

        teststdout.expect("Shutting down, please wait")
        cli.onecmd("quit")