def __test_missing_destination(self, command): self.listener.reset() self.conn.send_frame(command) self.assertTrue(self.listener.wait()) self.assertEqual(1, len(self.listener.errors)) err = self.listener.errors[0] self.assertEqual("Missing destination", err['headers']['message']) def __test_invalid_destination(self, dtype, content): self.listener.reset() self.conn.send("/" + dtype + content, '__test_invalid_destination:' + dtype + content) self.assertTrue(self.listener.wait()) self.assertEqual(1, len(self.listener.errors)) err = self.listener.errors[0] self.assertEqual("Invalid destination", err['headers']['message']) self.assertEqual( "'" + content + "' is not a valid " + dtype + " destination\n", err['message']) if __name__ == '__main__': import test_runner modules = [__name__] test_runner.run_unittests(modules)
#!/usr/bin/env python import test_runner if __name__ == '__main__': modules = [ 'ack', 'destinations', 'errors', 'lifecycle', 'parsing', 'queue_properties', 'redelivered', 'reliability', 'transactions', 'x_queue_name', ] test_runner.run_unittests(modules)