From f2d6acf834c65985ee2d906d544299cded0be990 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Sun, 5 Feb 2017 06:17:59 +0100
Subject: [PATCH] artificial coverage

---
 tests/test_clustering/test_things.py | 29 +++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/tests/test_clustering/test_things.py b/tests/test_clustering/test_things.py
index eda7bde..0adc821 100644
--- a/tests/test_clustering/test_things.py
+++ b/tests/test_clustering/test_things.py
@@ -3,7 +3,7 @@
 from __future__ import print_function, absolute_import, division
 import six
 import unittest
-import time, logging, threading, monotonic
+import time, logging, threading, monotonic, warnings
 from coolamqp.objects import Message, MessageProperties, NodeDefinition, Queue, ReceivedMessage, Exchange
 from coolamqp.clustering import Cluster, MessageReceived, NothingMuch
 
@@ -23,3 +23,30 @@ class TestConnecting(unittest.TestCase):
     def test_shutdown_without_start(self):
         c = Cluster([NODE])
         self.assertRaises(RuntimeError, lambda: c.shutdown())
+
+    def test_exchange_with_unicode_type_warnings(self):
+        with warnings.catch_warnings(record=True) as w:
+            warnings.simplefilter('always')
+            Exchange(u'lol', type=u'wtf')
+            assert len(w) == 1
+
+    def test_queues_equal_and_hashable(self):
+        q1 = Queue(u'lolwut')
+        q2 = Queue(b'lolwut')
+        q3 = Queue(u'not')
+
+        self.assertEquals(q1, q2)
+        self.assertEquals(hash(q1), hash(q2))
+        self.assertNotEqual(q1, q3)
+
+    def test_node_with_kwargs(self):
+        node = NodeDefinition(host='127.0.0.1',
+                              user='guest',
+                              password='guest')
+
+        self.assertEquals(node.virtual_host, '/')   # default
+
+    def test_amqpconnstring_port(self):
+        node = NodeDefinition('amqp://lol:lol@lol:4123/vhost')
+
+        self.assertEquals(node.port, 4123)
-- 
GitLab