From eab730d322a5970a2590b7cff1efbfd132f2b2aa Mon Sep 17 00:00:00 2001 From: Jason R Briggs Date: Mon, 25 Jan 2016 23:19:54 +0000 Subject: [PATCH] add basic cli test to cover headers --- stomp/test/cli_test.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/stomp/test/cli_test.py b/stomp/test/cli_test.py index 693fe619..e279a70f 100644 --- a/stomp/test/cli_test.py +++ b/stomp/test/cli_test.py @@ -86,6 +86,24 @@ def testsendfile(self): teststdout.expect('Shutting down, please wait') cli.onecmd('quit') + def testsendfileheaders(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 { "custom" : "header" }' % f.name) + + time.sleep(3) + + teststdout.expect('Shutting down, please wait') + cli.onecmd('quit') + def testabort(self): teststdin = TestStdin() teststdout = TestStdout(self)