From a9b94572a7f0cd82342b977992eecc19bdea208c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Fri, 3 Jan 2020 18:07:59 +0100 Subject: [PATCH] fix tests --- MANIFEST.in | 1 + tests/test_clustering/test_a.py | 10 +++++----- tests/test_clustering/test_double.py | 15 +++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 7b74127..43ea391 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ include LICENSE include README.md +include CHANGELOG.md include requirements.txt diff --git a/tests/test_clustering/test_a.py b/tests/test_clustering/test_a.py index 7b15d22..ac46f7c 100644 --- a/tests/test_clustering/test_a.py +++ b/tests/test_clustering/test_a.py @@ -5,11 +5,11 @@ Test things from __future__ import print_function, absolute_import, division import logging -import monotonic import os import time import unittest +import monotonic import six from coolamqp.clustering import Cluster, MessageReceived, NothingMuch @@ -112,13 +112,13 @@ class TestA(unittest.TestCase): self.c.publish(Message(b'hello4', properties={ 'content_type': b'text/plain', 'content_encoding': b'utf8' - }), routing_key=u'hello', confirm=True).result() + }), routing_key=u'hello4', confirm=True).result() self.assertRaises(RuntimeError, lambda: self.c.publish(Message(b'hello4', properties={ 'content_type': b'text/plain', 'content_encoding': b'utf8' - }), routing_key=u'hello', confirm=True, + }), routing_key=u'hello4', confirm=True, tx=True).result()) time.sleep(1) @@ -142,7 +142,7 @@ class TestA(unittest.TestCase): self.c.publish(Message(b'hello5', properties={ 'content_type': b'text/plain', 'content_encoding': b'utf8' - }), routing_key=u'hello', tx=True).result() + }), routing_key=u'hello5', tx=True).result() time.sleep(1) @@ -161,7 +161,7 @@ class TestA(unittest.TestCase): con, fut = self.c.consume(Queue(u'hello6', exclusive=True), on_message=ok, no_ack=True) fut.result() - self.c.publish(Message(b'hello6'), routing_key=u'hello', + self.c.publish(Message(b'hello6'), routing_key=u'hello6', tx=True).result() time.sleep(1) diff --git a/tests/test_clustering/test_double.py b/tests/test_clustering/test_double.py index b5dd6d1..e05267a 100644 --- a/tests/test_clustering/test_double.py +++ b/tests/test_clustering/test_double.py @@ -1,17 +1,16 @@ # coding=UTF-8 -""" -Double trouble! -""" +"""Double uplink, double the trouble!""" from __future__ import print_function, absolute_import, division -import six + +import logging +import time import unittest -import time, logging, threading -from coolamqp.objects import Message, MessageProperties, NodeDefinition, Queue, \ - ReceivedMessage + from coolamqp.clustering import Cluster +from coolamqp.exceptions import AMQPError, RESOURCE_LOCKED +from coolamqp.objects import NodeDefinition, Queue NODE = NodeDefinition('127.0.0.1', 'guest', 'guest', heartbeat=20) -from coolamqp.exceptions import AMQPError, RESOURCE_LOCKED logging.basicConfig(level=logging.DEBUG) -- GitLab